[PATCH] D69785: [OpenMP] Introduce the OpenMP-IR-Builder
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 09:16:08 PST 2019
ABataev added inline comments.
================
Comment at: llvm/lib/Frontend/OpenMPIRBuilder.cpp:152-155
+ std::string LineStr = std::to_string(DIL->getLine());
+ std::string ColumnStr = std::to_string(DIL->getColumn());
+ std::string SrcLocStr = (";" + Filename + ";" + Function).str() + ";" +
+ LineStr + ";" + ColumnStr + ";;";
----------------
better to use streams
================
Comment at: llvm/lib/Frontend/OpenMPIRBuilder.cpp:169-174
+ 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;
+
----------------
Will it work with the late outlined parallel regions?
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