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

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 05:29:16 PDT 2023


kiranchandramohan added inline comments.


================
Comment at: mlir/lib/Target/LLVMIR/CMakeLists.txt:42
   MLIRTranslateLib
+  MLIROpenMPDialect
   )
----------------
Mogball wrote:
> This seems problematic. OpenMP dialect should not be a dependency on the generic LLVMIR export. It seems there is a layering issue here. You need to add your own LLVMIR export target with the OpenMP dialect registered.
@jsjodin If the link error is coming due to the use of the `OffloadInterface` then you can remove its usage and access attributes directly. If accessing attributes still causes a link error then you can consider initializing the OpenMPIRBuilder using the amdendOperation flow. You might have to move `convertModule` to somewhere earlier for this to work. If that is also not possible and there are no other ideas then please revert the patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147172



More information about the llvm-commits mailing list