aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/LiveVariables.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-05 00:59:57 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-05 00:59:57 +0000
commitc7daf1f37a8c97e5ffc44f52e818cf127fae178e (patch)
tree9e0d41836f9fcae91af847f9483fcc3cb0ca780c /include/llvm/CodeGen/LiveVariables.h
parent4bba6c20ee470116510afdc6c9da98f580e04510 (diff)
downloadexternal_llvm-c7daf1f37a8c97e5ffc44f52e818cf127fae178e.tar.gz
external_llvm-c7daf1f37a8c97e5ffc44f52e818cf127fae178e.tar.bz2
external_llvm-c7daf1f37a8c97e5ffc44f52e818cf127fae178e.zip
Refactor code. Remove duplicated functions that basically do the same thing as
findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveVariables.h')
-rw-r--r--include/llvm/CodeGen/LiveVariables.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index b4f0db4c89..859ec94e44 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -130,7 +130,7 @@ private:
private: // Intermediate data structures
MachineFunction *MF;
- const TargetRegisterInfo *RegInfo;
+ const TargetRegisterInfo *TRI;
// PhysRegInfo - Keep track of which instruction was the last def/use of a
// physical register. This is a purely local property, because all physical
@@ -175,18 +175,10 @@ public:
virtual bool runOnMachineFunction(MachineFunction &MF);
- /// KillsRegister - Return true if the specified instruction kills the
- /// specified register.
- bool KillsRegister(MachineInstr *MI, unsigned Reg) const;
-
/// RegisterDefIsDead - Return true if the specified instruction defines the
/// specified register, but that definition is dead.
bool RegisterDefIsDead(MachineInstr *MI, unsigned Reg) const;
- /// ModifiesRegister - Return true if the specified instruction modifies the
- /// specified register.
- bool ModifiesRegister(MachineInstr *MI, unsigned Reg) const;
-
//===--------------------------------------------------------------------===//
// API to update live variable information
@@ -202,7 +194,7 @@ public:
/// not found.
void addVirtualRegisterKilled(unsigned IncomingReg, MachineInstr *MI,
bool AddIfNotFound = false) {
- if (MI->addRegisterKilled(IncomingReg, RegInfo, AddIfNotFound))
+ if (MI->addRegisterKilled(IncomingReg, TRI, AddIfNotFound))
getVarInfo(IncomingReg).Kills.push_back(MI);
}
@@ -239,7 +231,7 @@ public:
/// AddIfNotFound is true, add a implicit operand if it's not found.
void addVirtualRegisterDead(unsigned IncomingReg, MachineInstr *MI,
bool AddIfNotFound = false) {
- if (MI->addRegisterDead(IncomingReg, RegInfo, AddIfNotFound))
+ if (MI->addRegisterDead(IncomingReg, TRI, AddIfNotFound))
getVarInfo(IncomingReg).Kills.push_back(MI);
}