aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-13 19:24:00 +0000
committerDan Gohman <gohman@apple.com>2010-05-13 19:24:00 +0000
commit49b4589978ca181537c8ae694ac4c8d58d27a09a (patch)
tree4ce239768a2457c5c072f64be5f7889343988370 /include/llvm/CodeGen
parente1308d86ed2402483aa9d056af531fd773e1121f (diff)
Add a utility function for conservatively clearing kill flags, and make
use of it in MachineCSE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h
index 905be96c35..131231e5ba 100644
--- a/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -162,6 +162,12 @@ public:
/// register or null if none is found. This assumes that the code is in SSA
/// form, so there should only be one definition.
MachineInstr *getVRegDef(unsigned Reg) const;
+
+ /// clearKillFlags - Iterate over all the uses of the given register and
+ /// clear the kill flag from the MachineOperand. This function is used by
+ /// optimization passes which extend register lifetimes and need only
+ /// preserve conservative kill flag information.
+ void clearKillFlags(unsigned Reg) const;
#ifndef NDEBUG
void dumpUses(unsigned RegNo) const;