[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 10:30:48 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:
> 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.
Repository:
  rL LLVM
https://reviews.llvm.org/D48979
    
    
More information about the llvm-commits
mailing list