[llvm] r335828 - AMDGPU: Fix AMDGPUCodeGenPrepare using uninitialized AMDGPUAS struct
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 28 03:18:23 PDT 2018
Author: arsenm
Date: Thu Jun 28 03:18:23 2018
New Revision: 335828
URL: http://llvm.org/viewvc/llvm-project?rev=335828&view=rev
Log:
AMDGPU: Fix AMDGPUCodeGenPrepare using uninitialized AMDGPUAS struct
Not sure how this wasn't noticed before.
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp?rev=335828&r1=335827&r2=335828&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp Thu Jun 28 03:18:23 2018
@@ -577,10 +577,11 @@ bool AMDGPUCodeGenPrepare::runOnFunction
if (!TPC)
return false;
- const TargetMachine &TM = TPC->getTM<TargetMachine>();
+ const AMDGPUTargetMachine &TM = TPC->getTM<AMDGPUTargetMachine>();
ST = &TM.getSubtarget<SISubtarget>(F);
DA = &getAnalysis<DivergenceAnalysis>();
HasUnsafeFPMath = hasUnsafeFPMath(F);
+ AMDGPUASI = TM.getAMDGPUAS();
bool MadeChange = false;
More information about the llvm-commits
mailing list