-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[AMDGPU] Skip debug machine instructions in AMDGPU SIWholeQuadMode pass. #134518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@llvm/pr-subscribers-debuginfo @llvm/pr-subscribers-backend-amdgpu Author: None (kpyzhov) ChangesFull diff: https://github.com/llvm/llvm-project/pull/134518.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
index 57ae7d63218dd..8ae134a7b8091 100644
--- a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+++ b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
@@ -1300,6 +1300,12 @@ void SIWholeQuadMode::processBlock(MachineBasicBlock &MBB, BlockInfo &BI,
for (unsigned Idx = 0;; ++Idx) {
MachineBasicBlock::iterator Next = II;
+
+ if (II != IE && II->isDebugInstr()) {
+ II = ++Next;
+ continue;
+ }
+
char Needs = StateExact | StateWQM; // Strict mode is disabled by default.
char OutNeeds = 0;
|
Pierre-vh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing test?
| for (unsigned Idx = 0;; ++Idx) { | ||
| MachineBasicBlock::iterator Next = II; | ||
|
|
||
| if (II != IE && II->isDebugInstr()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not all meta instructions? Also testcase?
| bb.0: | ||
| successors: %bb.1(0x40000000), %bb.2(0x40000000); %bb.1(50.00%), %bb.2(50.00%) | ||
| liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4, $sgpr5, $sgpr6, $sgpr7, $sgpr8, $sgpr9, $sgpr10, $sgpr11, $sgpr12, $sgpr13, $sgpr14, $sgpr15, $sgpr16, $sgpr17, $sgpr18, $sgpr19, $vgpr8, $vgpr9, $vgpr12, $vgpr51, $vgpr52, $vgpr53, $vgpr54, $vgpr55, $vgpr56, $vgpr57, $vgpr58, $vgpr59, $vgpr60, $vgpr61 | ||
| %126:vgpr_32 = COPY $vgpr60, debug-instr-number 754 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-run-pass=none to compact the register numbers
| declare void @test() #0 | ||
|
|
||
| !0 = !DILocalVariable(name: "rayPayload", arg: 1, scope: !661, file: !106, line: 232, type: !304) | ||
| !36 = !DIBasicType(name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) | ||
| !106 = !DIFile(filename: "./RaytracingShaderHelper.hlsli", directory: "") | ||
| !153 = !DIDerivedType(tag: DW_TAG_typedef, name: "UINT", file: !106, line: 20, baseType: !154) | ||
| !154 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint", file: !106, line: 57, baseType: !36) | ||
| !182 = !DIDerivedType(tag: DW_TAG_typedef, name: "XMFLOAT4", file: !106, line: 17, baseType: !36) | ||
| !304 = !DICompositeType(tag: DW_TAG_structure_type, name: "RayPayload", file: !106, line: 60, size: 160, align: 32, elements: !305) | ||
| !305 = !{!306, !307} | ||
| !306 = !DIDerivedType(tag: DW_TAG_member, name: "color", scope: !304, file: !106, line: 62, baseType: !182, size: 128, align: 32) | ||
| !307 = !DIDerivedType(tag: DW_TAG_member, name: "recursionDepth", scope: !304, file: !106, line: 63, baseType: !153, size: 32, align: 32, offset: 128) | ||
| !325 = distinct !DISubprogram(name: "HitWorldPosition", linkageName: "\01?HitWorldPosition@@YA?AV?$vector@M$02@@XZ", scope: !106, file: !106, line: 89, type: !326, scopeLine: 90, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition) | ||
| !326 = !DISubroutineType(types: !327) | ||
| !327 = !{} | ||
| !661 = !DILocation(line: 0, scope: !325, inlinedAt: !662) | ||
| !662 = distinct !DILocation(line: 249, column: 34, scope: !325) | ||
| !665 = !DILocation(line: 91, column: 12, scope: !325, inlinedAt: !666) | ||
| !666 = distinct !DILocation(line: 239, column: 26, scope: !325) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compact these numbers?
| @@ -0,0 +1,109 @@ | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -0,0 +1,109 @@ | |||
|
|
|||
| # RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1150 -run-pass=si-wqm -o - %s | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing check of output
|
Can you elaborate on the purpose of this change as there is no description? |
No description provided.