Skip to content

Commit 0eb5168

Browse files
authored
[AMDGPU] Remove dom tree requirements from SIWholeQuadMode pass (#71012)
SIWholeQuadMode preserves dominator and post dominator trees, but does not require them.
1 parent 3bc056d commit 0eb5168

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ class SIWholeQuadMode : public MachineFunctionPass {
238238
AU.addRequired<LiveIntervals>();
239239
AU.addPreserved<SlotIndexes>();
240240
AU.addPreserved<LiveIntervals>();
241-
AU.addRequired<MachineDominatorTree>();
242241
AU.addPreserved<MachineDominatorTree>();
243-
AU.addRequired<MachinePostDominatorTree>();
244242
AU.addPreserved<MachinePostDominatorTree>();
245243
MachineFunctionPass::getAnalysisUsage(AU);
246244
}
@@ -1594,8 +1592,8 @@ bool SIWholeQuadMode::runOnMachineFunction(MachineFunction &MF) {
15941592
TRI = &TII->getRegisterInfo();
15951593
MRI = &MF.getRegInfo();
15961594
LIS = &getAnalysis<LiveIntervals>();
1597-
MDT = &getAnalysis<MachineDominatorTree>();
1598-
PDT = &getAnalysis<MachinePostDominatorTree>();
1595+
MDT = getAnalysisIfAvailable<MachineDominatorTree>();
1596+
PDT = getAnalysisIfAvailable<MachinePostDominatorTree>();
15991597

16001598
if (ST->isWave32()) {
16011599
AndOpc = AMDGPU::S_AND_B32;

llvm/test/CodeGen/AMDGPU/llc-pipeline.ll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
; GCN-O0-NEXT: MachineDominator Tree Construction
106106
; GCN-O0-NEXT: Slot index numbering
107107
; GCN-O0-NEXT: Live Interval Analysis
108-
; GCN-O0-NEXT: MachinePostDominator Tree Construction
109108
; GCN-O0-NEXT: SI Whole Quad Mode
110109
; GCN-O0-NEXT: Virtual Register Map
111110
; GCN-O0-NEXT: Live Register Matrix
@@ -334,7 +333,6 @@
334333
; GCN-O1-NEXT: Register Coalescer
335334
; GCN-O1-NEXT: Rename Disconnected Subregister Components
336335
; GCN-O1-NEXT: Machine Instruction Scheduler
337-
; GCN-O1-NEXT: MachinePostDominator Tree Construction
338336
; GCN-O1-NEXT: SI Whole Quad Mode
339337
; GCN-O1-NEXT: Virtual Register Map
340338
; GCN-O1-NEXT: Live Register Matrix
@@ -626,7 +624,6 @@
626624
; GCN-O1-OPTS-NEXT: Rename Disconnected Subregister Components
627625
; GCN-O1-OPTS-NEXT: AMDGPU Pre-RA optimizations
628626
; GCN-O1-OPTS-NEXT: Machine Instruction Scheduler
629-
; GCN-O1-OPTS-NEXT: MachinePostDominator Tree Construction
630627
; GCN-O1-OPTS-NEXT: SI Whole Quad Mode
631628
; GCN-O1-OPTS-NEXT: Virtual Register Map
632629
; GCN-O1-OPTS-NEXT: Live Register Matrix
@@ -929,7 +926,6 @@
929926
; GCN-O2-NEXT: Rename Disconnected Subregister Components
930927
; GCN-O2-NEXT: AMDGPU Pre-RA optimizations
931928
; GCN-O2-NEXT: Machine Instruction Scheduler
932-
; GCN-O2-NEXT: MachinePostDominator Tree Construction
933929
; GCN-O2-NEXT: SI Whole Quad Mode
934930
; GCN-O2-NEXT: Virtual Register Map
935931
; GCN-O2-NEXT: Live Register Matrix
@@ -1245,7 +1241,6 @@
12451241
; GCN-O3-NEXT: Rename Disconnected Subregister Components
12461242
; GCN-O3-NEXT: AMDGPU Pre-RA optimizations
12471243
; GCN-O3-NEXT: Machine Instruction Scheduler
1248-
; GCN-O3-NEXT: MachinePostDominator Tree Construction
12491244
; GCN-O3-NEXT: SI Whole Quad Mode
12501245
; GCN-O3-NEXT: Virtual Register Map
12511246
; GCN-O3-NEXT: Live Register Matrix

0 commit comments

Comments
 (0)