[PATCH] D151035: [WIP][OpenMP][OpenMPIRBuilder] Migrate kernel launch code and host fallback code generation from Clang to the OpenMPIRBuilder

Akash Banerjee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 07:54:05 PDT 2023


TIFitis added inline comments.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:863-898
+static void EmitBranch(IRBuilderBase &Builder, BasicBlock *Target) {
+  // Emit a branch from the current block to the target one if this
+  // was a real block.  If this was just a fall-through block after a
+  // terminator, don't emit it.
+  BasicBlock *CurBB = Builder.GetInsertBlock();
+
+  if (!CurBB || CurBB->getTerminator()) {
----------------
D146557 already migrates these along with `emitIfClause`.


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

https://reviews.llvm.org/D151035



More information about the llvm-commits mailing list