[llvm] [OpenMP][OpenMPIRBuilder][NFC] Move copyInput to a passed in lambda function (PR #68124)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 10:43:35 PDT 2023


================
@@ -5301,6 +5319,23 @@ TEST_F(OpenMPIRBuilderTest, TargetRegionDevice) {
       Constant::getNullValue(PointerType::get(Ctx, 0)),
       Constant::getNullValue(PointerType::get(Ctx, 0))};
 
+  auto SimpleArgAccessorCB = [&](llvm::Argument &Arg, llvm::Value *Input,
+                                 IRBuilderBase &Builder) {
----------------
agozillon wrote:

It's currently only ever called by createOutlinedFunction, which does pre-set the insertion point (and currently doesn't use the AllocaIP which results in slightly differing IR to Clang currently) and takes a lot of ownership of where that insertion point is at the moment, so this mainly just keeps the status quo that exists right now. 

However, I am more than happy to allow it to take an IP or perhaps two, to make the IR from MLIR vs Clang look a little more identical and this would also allow me to utilise the ModuleTranslation builder as @TIFitis suggests

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


More information about the llvm-commits mailing list