[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Chris Lattner
lattner at cs.uiuc.edu
Sat Jan 1 07:59:11 PST 2005
Changes in directory llvm/include/llvm/CodeGen:
LiveVariables.h updated: 1.19 -> 1.20
---
Log message:
Add a useful accessor
---
Diffs of the changes: (+10 -0)
Index: llvm/include/llvm/CodeGen/LiveVariables.h
diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.19 llvm/include/llvm/CodeGen/LiveVariables.h:1.20
--- llvm/include/llvm/CodeGen/LiveVariables.h:1.19 Thu Aug 26 17:23:32 2004
+++ llvm/include/llvm/CodeGen/LiveVariables.h Sat Jan 1 09:58:55 2005
@@ -125,6 +125,16 @@
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);
}
More information about the llvm-commits
mailing list