summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
diff options
context:
space:
mode:
authorDavid Stuttard <david.stuttard@amd.com>2018-11-19 15:44:20 +0000
committerDavid Stuttard <david.stuttard@amd.com>2018-11-19 15:44:20 +0000
commitbe3d7ba9fb0902ad590301ebeff7fbf5587e6a63 (patch)
tree7a53e883786299d0ad40def4aa05cf1a2c39218d /llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
parent5e9215f02bc54f89148da065e40948fbd038a2c4 (diff)
downloadbcm5719-llvm-be3d7ba9fb0902ad590301ebeff7fbf5587e6a63.tar.gz
bcm5719-llvm-be3d7ba9fb0902ad590301ebeff7fbf5587e6a63.zip
[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 llvm-svn: 347221
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
index d07c0516c27..3ff764ee4e5 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -911,9 +911,9 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
}
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"
OpenPOWER on IntegriCloud