[PATCH] D136872: [OpenMP][OpenMPIRBuilder] Migrate loadOffloadInfoMetadata from clang to OMPIRbuilder

Akash Banerjee via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 28 15:27:27 PDT 2022


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


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:4717
+  if (!isDevice)
+    return;
+
----------------
jdoerfert wrote:
> TIFitis wrote:
> > jdoerfert wrote:
> > > Why do we call it if isDevice is false? Module should be available to the IRBuilder.
> > loadOffloadInfoMetadata is called from clang with a different Module generated using parseBitcodeFile. I've checked that the module available from OMPIRBuilder and the one passed by clang are different and cause errors.
> I see. Then document this explicitly in the doxygen comment of the declaration, please. Also check isDevice at the call site.
Added doxygen comment. isDevice is checked at call site through CGM.getLangOpts().OpenMPIsDevice.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136872



More information about the cfe-commits mailing list