[llvm] [CodeGen] NFC: Move isDead to MachineInstr (PR #123531)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 23:09:24 PST 2025
================
@@ -1786,6 +1787,13 @@ class MachineInstr
/// Return true if all the implicit defs of this instruction are dead.
bool allImplicitDefsAreDead() const;
+ /// Check whether an MI is dead. If \p LivePhysRegs is provided, it is assumed
+ /// to be at the position of MI and will be used to check the Liveness of
+ /// physical register defs. If \p LivePhysRegs is not provided, this will
+ /// pessimistically assume any PhysReg def is live.
+ bool isDead(const MachineRegisterInfo *MRI,
+ LiveRegUnits *LivePhysRegs = nullptr) const;
----------------
arsenm wrote:
Should move this next to wouldBeTriviallyDead, and preferably explain the difference between them
https://github.com/llvm/llvm-project/pull/123531
More information about the llvm-commits
mailing list