[llvm] [CodeGen] Refactor DeadMIElim isDead and GISel isTriviallyDead (PR #105956)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 04:04:45 PDT 2024
================
@@ -1725,6 +1730,10 @@ class MachineInstr
/// the instruction's location and its intended destination.
bool isSafeToMove(bool &SawStore) const;
+ /// Return true if this instruction can be considered dead if all of its
+ /// defined registers are dead.
+ bool canBeDead() const;
----------------
nikic wrote:
In IR the corresponding query is called wouldInstructionBeTriviallyDead(). I'd maybe use `wouldBeTriviallyDead()` here for symmetry.
https://github.com/llvm/llvm-project/pull/105956
More information about the llvm-commits
mailing list