Skip to content

Commit 2dced06

Browse files
vikramRHPrasoonMishra
authored andcommitted
Fixes to be upstreamed - 8
preserve liveIntervals, VirtRegMapAnalysis and LiveRegMatrix analysis for AMDGPURewriteAGPRCopyMFMAPass (as in legacy) specifically not preserving VirtRegMap causes it to be invalidated and thus VirtRegRewriter has invalid info next in pipeline
1 parent 8e6fb0e commit 2dced06

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,10 @@ AMDGPURewriteAGPRCopyMFMAPass::run(MachineFunction &MF,
659659
if (!Impl.run(MF))
660660
return PreservedAnalyses::all();
661661
auto PA = getMachineFunctionPassPreservedAnalyses();
662-
PA.preserveSet<CFGAnalyses>();
663-
PA.preserve<LiveStacksAnalysis>();
662+
PA.preserveSet<CFGAnalyses>()
663+
.preserve<LiveStacksAnalysis>()
664+
.preserve<VirtRegMapAnalysis>()
665+
.preserve<LiveIntervalsAnalysis>()
666+
.preserve<LiveRegMatrixAnalysis>();
664667
return PA;
665668
}

0 commit comments

Comments
 (0)