[PATCH] D48979: AMDGPU: Fix UBSan error caused by r335942
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 5 11:13:10 PDT 2018
tstellar added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUISelLowering.cpp:3942-3944
const AMDGPUMachineFunction *MFI = MF.getInfo<AMDGPUMachineFunction>();
- const AMDGPUSubtarget &ST = MF.getSubtarget<AMDGPUSubtarget>();
- unsigned ExplicitArgOffset = ST.getExplicitKernelArgOffset(MF.getFunction());
+ const AMDGPUCommonSubtarget &ST =
+ AMDGPUCommonSubtarget::get(getTargetMachine(), MF.getFunction());
----------------
arsenm wrote:
> tstellar wrote:
> > arsenm wrote:
> > > Why can't this keep getting the offset from the subtarget?
> > That would require moving another function (isAMDCodeObjectV2) into the AMDGPUCommonSubtarget class. I've been trying not to add more things to this class, but I can make this change.
> This ABI stuff probably does need to move there, but my main concern is how this broke so subtly
AMDGPUSubtarget is now GCN specific, so I just forgot to rename AMDGPUSubtarget->AMDGPUCommonSubtarget.
I have a few cleanups to do after splitting the targets and making the subtarget names make sense is one of them.
Repository:
rL LLVM
https://reviews.llvm.org/D48979
More information about the llvm-commits
mailing list