[Mlir-commits] [mlir] 4d83aa4 - [MLIR][OpenMP] Fix OpenMPIRBuilder usage after D82470

Johannes Doerfert llvmlistbot at llvm.org
Thu Jul 30 09:57:12 PDT 2020


Author: Johannes Doerfert
Date: 2020-07-30T11:54:57-05:00
New Revision: 4d83aa4771d84940626d86c883193af390812281

URL: https://github.com/llvm/llvm-project/commit/4d83aa4771d84940626d86c883193af390812281
DIFF: https://github.com/llvm/llvm-project/commit/4d83aa4771d84940626d86c883193af390812281.diff

LOG: [MLIR][OpenMP] Fix OpenMPIRBuilder usage after D82470

Added: 
    

Modified: 
    mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
index a0aefc988a5d..2c61f2a4ac11 100644
--- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -456,8 +456,12 @@ ModuleTranslation::convertOmpParallel(Operation &opInst,
   llvm::Value *ifCond = nullptr;
   llvm::Value *numThreads = nullptr;
   bool isCancellable = false;
+  // TODO: Determine the actual alloca insertion point, e.g., the function
+  // entry or the alloca insertion point as provided by the body callback
+  // above.
+  llvm::OpenMPIRBuilder::InsertPointTy allocaIP(builder.saveIP());
   builder.restoreIP(ompBuilder->CreateParallel(
-      builder, bodyGenCB, privCB, finiCB, ifCond, numThreads,
+      builder, allocaIP, bodyGenCB, privCB, finiCB, ifCond, numThreads,
       llvm::omp::OMP_PROC_BIND_default, isCancellable));
   return success();
 }


        


More information about the Mlir-commits mailing list