[PATCH] D20335: [AMDGPU] Emit debugger prologue and emit the rest of the debugger fields in the kernel code header
Konstantin Zhuravlyov via llvm-commits
llvm-commits at lists.llvm.org
Wed May 25 09:09:24 PDT 2016
kzhuravl added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.h:80-86
@@ -77,1 +79,9 @@
+ // Fixed SGPR number used to hold wave scratch offset for entire kernel
+ // execution, or uint16_t(-1) if the register is not used or not known.
+ uint16_t DebuggerWavefrontPrivateSegmentOffsetSGPR;
+ // Fixed SGPR number of the first 4 SGPRs used to hold scratch V# for entire
+ // kernel execution, or uint16_t(-1) if the register is not used or not
+ // known.
+ uint16_t DebuggerPrivateSegmentBufferSGPR;
+
----------------
Because we have to be compliant with our existing spec, which says to put SGPR number or (uint16_t)-1.
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:603
@@ +602,3 @@
+ // Create fixed stack object for work group ID.
+ ObjectIdx = MF.getFrameInfo()->CreateFixedObject(4, i * 4, true);
+ Info->setDebuggerWorkGroupIDStackObjectIndex(i, ObjectIdx);
----------------
Is there any advantage to having a single object?
The reason for having multiple objects is so we can use storeRegToStackSlot, which creates spills.
http://reviews.llvm.org/D20335
More information about the llvm-commits
mailing list