[PATCH] D69490: [LoopIdiomRecognize] Avoid trying to create a pattern from the address of a thread local.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 27 23:23:13 PDT 2019


lebedev.ri added a comment.

I'm not the best reviewer for this, and i'm not sure who is the code owner for that pass..



================
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;
----------------
What about `GlobalVariable`'s that aren't global constants?



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