[PATCH] D69490: [LoopIdiomRecognize] Avoid trying to create a pattern from the address of a thread local.
Ben via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 16:27:22 PDT 2019
bobsayshilol added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:444-449
+ // While technically constant, the address of a thread_local GlobalVariable
+ // isn't known until runtime and would require additional tls init code to
+ // handle correctly.
+ if (GlobalVariable *GV = dyn_cast<GlobalVariable>(C))
+ if (GV->isThreadDependent())
+ return nullptr;
----------------
lebedev.ri wrote:
> What about `GlobalVariable`'s that aren't global constants?
>
Can you give an example? `GlobalVariable` inherits from `Constant` since their address is constant, so my understanding was that all `GlobalVariable`s are therefore (global) `Constant`s.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69490/new/
https://reviews.llvm.org/D69490
More information about the llvm-commits
mailing list