[PATCH] D120000: [1/2] TLS loads opimization (hoist)
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 23 02:57:24 PST 2022
xiangzhangllvm marked 13 inline comments as done.
xiangzhangllvm added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/TLSVariableHoist.cpp:186
+ BasicBlock &Entry = Fn.getEntryBlock();
+ BasicBlock::iterator Iter = Entry.getFirstInsertionPt();
+ Type *Ty = GV->getType();
----------------
xiangzhangllvm wrote:
> LuoYuanke wrote:
> > xiangzhangllvm wrote:
> > > craig.topper wrote:
> > > > xiangzhangllvm wrote:
> > > > > craig.topper wrote:
> > > > > > Is this before the allocas?
> > > > > Sorry, don't much understand,
> > > > > What the problem if it before allocas ?
> > > > > This is in IR level and the Global Value do not need "allocas"
> > > > The alloca instructions for the function's local variables are the first instructons in the entry basic block. Not if we should be putting the bitcast before them.
> > > OK, Let me re-place the bitcast position.
> > Would you add a test case with alloca for checking?
> Yes, no problem
Let me refine here a little later, I am considering get the insert position by checking dominate relation to reduce life range.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120000/new/
https://reviews.llvm.org/D120000
More information about the llvm-commits
mailing list