[llvm] [LiveIns] Improve recomputeLiveIns() (PR #88951)
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 12:17:54 PDT 2024
================
@@ -197,16 +197,16 @@ void computeAndAddLiveIns(LivePhysRegs &LiveRegs,
/// Convenience function for recomputing live-in's for a MBB. Returns true if
/// any changes were made.
-static inline bool recomputeLiveIns(MachineBasicBlock &MBB) {
+inline bool recomputeLiveIns(MachineBasicBlock &MBB) {
LivePhysRegs LPR;
- auto oldLiveIns = MBB.getLiveIns();
+ std::vector<MachineBasicBlock::RegisterMaskPair> OldLiveIns;
- MBB.clearLiveIns();
+ MBB.clearLiveIns(OldLiveIns);
computeAndAddLiveIns(LPR, MBB);
MBB.sortUniqueLiveIns();
- auto newLiveIns = MBB.getLiveIns();
- return oldLiveIns != newLiveIns;
+ auto NewLiveIns = MBB.getLiveIns();
----------------
redstar wrote:
Changed.
https://github.com/llvm/llvm-project/pull/88951
More information about the llvm-commits
mailing list