Skip to content

Commit 11026a8

Browse files
authored
[CodeGen][NewPM] Preserve all MF analyses in MFPM (#124707)
Invalidation is already handled in the passes loop for MFAM, so all of the rest analyses are preserved. (See `PassManager::run()`) This won't change the number of invalidations, but will prevent needless `MFAM::Invalidator::invalidate()` invocations made by results depending on other results (since the invalidate shorts if `<AllAnalysesOn<MF>>` is preserved)
1 parent 1cbfac0 commit 11026a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/CodeGen/MachinePassManager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ PassManager<MachineFunction>::run(MachineFunction &MF,
152152
PI.runAfterPass(*Pass, MF, PassPA);
153153
PA.intersect(std::move(PassPA));
154154
}
155+
PA.preserveSet<AllAnalysesOn<MachineFunction>>();
155156
return PA;
156157
}
157158

0 commit comments

Comments
 (0)