[PATCH] D54301: [AMDGPU] Derive GCNSubtarget from MF to get overridden target features
David Stuttard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 9 03:27:05 PST 2018
dstuttard created this revision.
Herald added subscribers: llvm-commits, t-tye, tpr, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm.
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
Repository:
rL LLVM
https://reviews.llvm.org/D54301
Files:
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
Index: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -911,9 +911,9 @@
}
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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54301.173295.patch
Type: text/x-patch
Size: 665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181109/faa5c5cb/attachment.bin>
More information about the llvm-commits
mailing list