[PATCH] D147172: [OpenMP][Flang][MLIR] Add lowering of TargetOp for host codegen

Jan Sjödin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 05:57:31 PDT 2023


jsjodin marked an inline comment as done.
jsjodin added inline comments.


================
Comment at: mlir/lib/Target/LLVMIR/ModuleTranslation.cpp:460
+                                     /* OpenMPOffloadMandatory */ false);
+  getOpenMPBuilder()->setConfig(Config);
 }
----------------
kiranchandramohan wrote:
> This will always create the OpenMPIRBuilder, even for non-OpenMP flows which is not what we want.
> 
> `getOpenMPBuilder` creates the Builder if it is not yet created. We can consider setting the config there.
> This will always create the OpenMPIRBuilder, even for non-OpenMP flows which is not what we want.
> 
> `getOpenMPBuilder` creates the Builder if it is not yet created. We can consider setting the config there.

Yes, that is a much better option. Moved the code there instead.


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

https://reviews.llvm.org/D147172



More information about the llvm-commits mailing list