[Mlir-commits] [mlir] [OpenMP][OpenMPIRBuilder][NFC] Move copyInput to a passed in lambda function (PR #68124)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Oct 3 10:47:52 PDT 2023


================
@@ -2166,6 +2166,9 @@ class OpenMPIRBuilder {
   using TargetBodyGenCallbackTy = function_ref<InsertPointTy(
       InsertPointTy AllocaIP, InsertPointTy CodeGenIP)>;
 
+  using TargetGenArgAccessorsCallbackTy = function_ref<Value *(
+      Argument &Arg, Value *Input, IRBuilderBase &Builder)>;
----------------
agozillon wrote:

I don't think the AllocaIP is currently used, the insertion point that's used at the moment is the first non-phi or debug node, which does result in slightly differing IR to Clang. But I'll utilise the insertion points pass in method and try to get it the IR closer to what Clang currently has.

My only worry of using two differing builders is if they have differing states, but I'm not sure if that is a concern, perhaps the builders only relevant state is the insertion points.

https://github.com/llvm/llvm-project/pull/68124


More information about the Mlir-commits mailing list