[PATCH] D69785: [OpenMP] Introduce the OpenMP-IR-Builder

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 07:40:29 PST 2019


ABataev added inline comments.


================
Comment at: llvm/lib/IR/OpenMPIRBuilder.cpp:153-159
+    // Search the entry block, not needed once all thread id calls go through
+    // here and are cached in the OpenMPIRBuilder.
+    for (Instruction &I : Fn->getEntryBlock())
+      if (CallInst *CI = dyn_cast<CallInst>(&I))
+        if (CI->getCalledFunction() &&
+            CI->getCalledFunction()->getName() == "__kmpc_global_thread_num")
+          return TID = CI;
----------------
Do you really need this if you have a deduplication pass?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69785/new/

https://reviews.llvm.org/D69785





More information about the llvm-commits mailing list