[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder
Jan Sjödin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 26 07:09:56 PDT 2023
jsjodin requested changes to this revision.
jsjodin added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:817
+ /// LLVMModule.
+ llvm::Constant *getAddrOfDeclareTargetVar(
+ llvm::OffloadEntriesInfoManager::OMPTargetGlobalVarEntryKind
----------------
No llvm:: prefix needed.
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:876
+ uint64_t Line, llvm::StringRef MangledName, llvm::Module *LlvmModule,
+ std::vector<llvm::GlobalVariable *> &GeneratedRefs, bool OpenMPSIMD,
+ bool OpenMPIsDevice, std::vector<llvm::Triple> TargetTriple,
----------------
Instead of passing in the various components I think it is better to pass in TargetRegionEntryInfo in case the inputs to create one changes. That way we avoid changing the parameters to this and the other functions.
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:877
+ std::vector<llvm::GlobalVariable *> &GeneratedRefs, bool OpenMPSIMD,
+ bool OpenMPIsDevice, std::vector<llvm::Triple> TargetTriple,
+ std::function<llvm::Constant *()> GlobalInitializer,
----------------
Passing OpenMPISDevice shouldn't be necessary, the IsEmbedded flag in the Config should be used instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149162/new/
https://reviews.llvm.org/D149162
More information about the cfe-commits
mailing list