aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-01-24 01:10:07 +0000
committerOwen Anderson <resistor@mac.com>2008-01-24 01:10:07 +0000
commitb487e7215c4f70f3d98f8fbc0a11eb119afc1f37 (patch)
treec707073b206365f8422c7ae4d64d3e02b802c910 /include/llvm/CodeGen/MachineInstr.h
parent3ae054385cfe9f2fcef2d77f26839615b1d3e48b (diff)
Move some functionality for adding flags to MachineInstr's into methods on MachineInstr rather than LiveVariables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46295 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 749d1f9a9a..068c335c7d 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -21,6 +21,7 @@
namespace llvm {
class TargetInstrDesc;
+class MRegisterInfo;
template <typename T> struct ilist_traits;
template <typename T> struct ilist;
@@ -144,6 +145,24 @@ public:
/// copyPredicates - Copies predicate operand(s) from MI.
void copyPredicates(const MachineInstr *MI);
+ /// addRegisterKilled - We have determined MI kills a register. Look for the
+ /// operand that uses it and mark it as IsKill. If AddIfNotFound is true,
+ /// add a implicit operand if it's not found. Returns true if the operand
+ /// exists / is added.
+ bool addRegisterKilled(unsigned IncomingReg, const MRegisterInfo *RegInfo,
+ bool AddIfNotFound = false);
+
+ /// addRegisterDead - We have determined MI defined a register without a use.
+ /// Look for the operand that defines it and mark it as IsDead. If
+ /// AddIfNotFound is true, add a implicit operand if it's not found. Returns
+ /// true if the operand exists / is added.
+ bool addRegisterDead(unsigned IncomingReg, const MRegisterInfo *RegInfo,
+ bool AddIfNotFound = false);
+
+ /// copyKillDeadInfo - copies killed/dead information from one instr to another
+ void copyKillDeadInfo(MachineInstr *OldMI,
+ const MRegisterInfo *RegInfo);
+
//
// Debugging support
//