Skip to content

Commit

Permalink
globalopt: propagate section to optimized global
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyxogen authored and yuri91 committed Jan 31, 2024
1 parent 1a18263 commit 4cafeab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llvm/lib/Transforms/IPO/GlobalOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,9 @@ OptimizeGlobalAddressOfAllocation(GlobalVariable *GV, CallInst *CI,
ConstantInt::getFalse(GV->getContext()),
GV->getName()+".init", GV->getThreadLocalMode());
bool InitBoolUsed = false;
// CHEERP: this is needed to propagate the "asmjs" section. It is probably
// a good idea in general, so we will do it for any section.
InitBool->setSection(NewGV->getSection());

// Loop over all instruction uses of GV, processing them in turn.
SmallVector<Value *, 4> Guses;
Expand Down

0 comments on commit 4cafeab

Please sign in to comment.