[llvm] r347221 - [AMDGPU] Derive GCNSubtarget from MF to get overridden target features
David Stuttard via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 07:44:21 PST 2018
Author: dstuttard
Date: Mon Nov 19 07:44:20 2018
New Revision: 347221
URL: http://llvm.org/viewvc/llvm-project?rev=347221&view=rev
Log:
[AMDGPU] Derive GCNSubtarget from MF to get overridden target features
Summary:
AMDGPUAsmPrinter has a getSTI function that derives a GCNSubtarget from the
TM. However, this means that overridden target features are not detected and can
result in incorrect behaviour.
Switch to using STM which is a GCNSubtarget derived from the MF (used elsewhere
in the same function).
Change-Id: Ib6328ad667b7fcdc87e9c06344e59859207db9b0
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D54301
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp?rev=347221&r1=347220&r2=347221&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Mon Nov 19 07:44:20 2018
@@ -911,9 +911,9 @@ void AMDGPUAsmPrinter::getSIProgramInfo(
}
ProgInfo.SGPRBlocks = IsaInfo::getNumSGPRBlocks(
- getSTI(), ProgInfo.NumSGPRsForWavesPerEU);
+ &STM, ProgInfo.NumSGPRsForWavesPerEU);
ProgInfo.VGPRBlocks = IsaInfo::getNumVGPRBlocks(
- getSTI(), ProgInfo.NumVGPRsForWavesPerEU);
+ &STM, ProgInfo.NumVGPRsForWavesPerEU);
// Update DebuggerWavefrontPrivateSegmentOffsetSGPR and
// DebuggerPrivateSegmentBufferSGPR fields if "amdgpu-debugger-emit-prologue"
More information about the llvm-commits
mailing list