Skip to content

Commit 04f018d

Browse files
linuxrocks123kzhuravl
authored andcommitted
Must run even at O0
1 parent 7c83055 commit 04f018d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,6 @@ void GCNPassConfig::addMachineSSAOptimization() {
17601760
}
17611761
addPass(&DeadMachineInstructionElimID);
17621762
addPass(createSIShrinkInstructionsLegacyPass());
1763-
addPass(&SILowerControlFlowLegacyID);
17641763
}
17651764

17661765
bool GCNPassConfig::addILPOpts() {
@@ -1820,6 +1819,7 @@ void GCNPassConfig::addFastRegAlloc() {
18201819
// FIXME: We have to disable the verifier here because of PHIElimination +
18211820
// TwoAddressInstructions disabling it.
18221821

1822+
insertPass(&PHIEliminationID, &SILowerControlFlowLegacyID);
18231823
insertPass(&TwoAddressInstructionPassID, &SIWholeQuadModeID);
18241824

18251825
TargetPassConfig::addFastRegAlloc();
@@ -1831,6 +1831,8 @@ void GCNPassConfig::addPreRegAlloc() {
18311831
}
18321832

18331833
void GCNPassConfig::addOptimizedRegAlloc() {
1834+
insertPass(&PHIEliminationID, &SILowerControlFlowLegacyID);
1835+
18341836
if (EnableDCEInRA)
18351837
insertPass(&DetectDeadLanesID, &DeadMachineInstructionElimID);
18361838

0 commit comments

Comments
 (0)