[PATCH] D109901: [AMDGPU] Legalize initialized LDS variables
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 09:14:42 PDT 2021
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:1381
// TODO: We could emit code to handle the initialization somewhere.
- if (!hasDefinedInitializer(GV)) {
- unsigned Offset = MFI->allocateLDSGlobal(DL, *cast<GlobalVariable>(GV));
- return DAG.getConstant(Offset, SDLoc(Op), Op.getValueType());
- }
+ // We ignore the initializer for now and legalize it to allow selection.
+ unsigned Offset = MFI->allocateLDSGlobal(DL, *cast<GlobalVariable>(GV));
----------------
Should explicitly note this will error later
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:2423
// TODO: We could emit code to handle the initialization somewhere.
- if (!AMDGPUTargetLowering::hasDefinedInitializer(GV)) {
- const SITargetLowering *TLI = ST.getTargetLowering();
- if (!TLI->shouldUseLDSConstAddress(GV)) {
- MI.getOperand(1).setTargetFlags(SIInstrInfo::MO_ABS32_LO);
- return true; // Leave in place;
- }
+ // We ignore the initializer for now and legalize it to allow selection.
+ const SITargetLowering *TLI = ST.getTargetLowering();
----------------
Ditto
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109901/new/
https://reviews.llvm.org/D109901
More information about the llvm-commits
mailing list