mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Add a useful accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd1cbc095a
commit
801abe663f
@ -125,6 +125,16 @@ public:
|
||||
return RegistersKilled.equal_range(MI);
|
||||
}
|
||||
|
||||
/// KillsRegister - Return true if the specified instruction kills the
|
||||
/// specified register.
|
||||
bool KillsRegister(MachineInstr *MI, unsigned Reg) {
|
||||
std::pair<killed_iterator, killed_iterator> KIP = killed_range(MI);
|
||||
for (; KIP.first != KIP.second; ++KIP.first)
|
||||
if (KIP.first->second == Reg)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
killed_iterator dead_begin(MachineInstr *MI) {
|
||||
return RegistersDead.lower_bound(MI);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user