[PATCH] D69785: [OpenMP] Introduce the OpenMP-IR-Builder
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 11 11:19:30 PST 2019
ABataev added inline comments.
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPConstants.h:74
+///
+///{
+namespace types {
----------------
Extra comments?
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPConstants.h:93
+} // namespace types
+///}
+
----------------
Here too.
================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:174-177
+ if (auto *IdentI = dyn_cast<Instruction>(Ident))
+ Call->moveAfter(IdentI);
+ else
+ Call->moveBefore(&*Fn->getEntryBlock().getFirstInsertionPt());
----------------
Are you sure it will work correctly with late outlining?
================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:186-188
+ // TODO: Do we really expect these create calls to happen at an invalid
+ // location and if so is ignoring them the right thing to do? This
+ // mimics Clang's behavior for now.
----------------
Clang drops insert point after some code, like call of `exit()` etc. That's why we need to check it in the frontend, otherwise, the compiler crashes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69785/new/
https://reviews.llvm.org/D69785
More information about the cfe-commits
mailing list