[PATCH] D48979: AMDGPU: Fix UBSan error caused by r335942
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 5 10:24:18 PDT 2018
arsenm 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());
----------------
Why can't this keep getting the offset from the subtarget?
================
Comment at: lib/Target/AMDGPU/AMDGPUISelLowering.h:297-298
uint32_t getImplicitParameterOffset(const MachineFunction &MF,
- const ImplicitParameter Param) const;
+ const ImplicitParameter Param,
+ unsigned ExplicitArgOffset) const;
----------------
Weird formatting
Repository:
rL LLVM
https://reviews.llvm.org/D48979
More information about the llvm-commits
mailing list