[Openmp-commits] [PATCH] D142569: [WIP][OpenMP] Introduce kernel argument
Matt Arsenault via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 25 11:29:19 PST 2023
arsenm added a comment.
Description not clear
================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:3912-3914
+ Constant *KernelEnvironmentCasted =
+ ConstantExpr::getPointerBitCastOrAddrSpaceCast(KernelEnvironment,
+ KernelEnvironmentTyPtr);
----------------
ConstantExpr::getAddrSpaceCast
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3479-3486
+ /// Return the IdentTy (ident_ty) corresponding to the associated kernel.
+ Constant *getKernelIdent(ConstantStruct *StructC) {
+ GlobalVariable *KernelEnvGV = getKernelEnvironementGlobalVariable();
+ auto *KernelEnvC = cast<ConstantStruct>(KernelEnvGV->getInitializer());
+ constexpr const unsigned IdentIdx = 1;
+ return KernelEnvC->getAggregateElement(IdentIdx);
+ }
----------------
Optimizations should be a separate change
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142569/new/
https://reviews.llvm.org/D142569
More information about the Openmp-commits
mailing list