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

Akash Banerjee llvmlistbot at llvm.org
Tue Oct 3 10:35:51 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)>;
----------------
TIFitis wrote:

I don't think passing around the builder is the coorect approach to solve this.

We should be passing and returning the inserpoints instead. We should pass the AllocaIP and CodeGenIP to the Callback, and the CB should return the new position of the IP.

If new allocas are not needed the we can perhaps ignore the AllocaIP.

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


More information about the Mlir-commits mailing list