[llvm] [AMDGPU] Teach SIPreEmitPeephole pass to preserve MachineLoopInfo (PR #178868)
Christudasan Devadasan via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 30 06:10:32 PST 2026
================
@@ -709,9 +716,14 @@ llvm::SIPreEmitPeepholePass::run(MachineFunction &MF,
MachineFunctionAnalysisManager &MFAM) {
auto *MDT = MFAM.getCachedResult<MachineDominatorTreeAnalysis>(MF);
auto *MPDT = MFAM.getCachedResult<MachinePostDominatorTreeAnalysis>(MF);
+ SIPreEmitPeephole Impl;
- if (SIPreEmitPeephole().run(MF))
- return getMachineFunctionPassPreservedAnalyses();
+ if (Impl.run(MF)) {
+ auto PA = getMachineFunctionPassPreservedAnalyses();
+ if (!Impl.isCFGModified())
----------------
cdevadas wrote:
Yep, don't use this separate checker for CFGModified transformations. It adds unwanted overhead and will become hard to maintain in the future.
https://github.com/llvm/llvm-project/pull/178868
More information about the llvm-commits
mailing list