R600: Add stack size to .AMDGPUcsdata section

reviewed-by: Vincent Lejeune <vljn at ovi.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard 2014-01-22 21:55:35 +00:00
parent 88a9f0476c
commit 0ed0ced91c

View File

@ -89,10 +89,16 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
SectionKind::getReadOnly());
OutStreamer.SwitchSection(CommentSection);
OutStreamer.EmitRawText(
Twine("; Kernel info:\n") +
"; NumSgprs: " + Twine(KernelInfo.NumSGPR) + "\n" +
"; NumVgprs: " + Twine(KernelInfo.NumVGPR) + "\n");
if (STM.getGeneration() > AMDGPUSubtarget::NORTHERN_ISLANDS) {
OutStreamer.EmitRawText(
Twine("; Kernel info:\n") +
"; NumSgprs: " + Twine(KernelInfo.NumSGPR) + "\n" +
"; NumVgprs: " + Twine(KernelInfo.NumVGPR) + "\n");
} else {
R600MachineFunctionInfo *MFI = MF.getInfo<R600MachineFunctionInfo>();
OutStreamer.EmitRawText(
Twine("SQ_PGM_RESOURCES:STACK_SIZE = " + Twine(MFI->StackSize)));
}
}
if (STM.dumpCode()) {