aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-04-02 18:04:08 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-04-02 18:04:08 +0000
commitea1d9cdc4e4f4e4570acddb7c4a63f703b110dad (patch)
tree33381d8203455212ef9178976304d72aaac53d9f /include/llvm
parent1088317675dd34a1823f427e472fb9e43c616cb1 (diff)
downloadexternal_llvm-ea1d9cdc4e4f4e4570acddb7c4a63f703b110dad.zip
external_llvm-ea1d9cdc4e4f4e4570acddb7c4a63f703b110dad.tar.gz
external_llvm-ea1d9cdc4e4f4e4570acddb7c4a63f703b110dad.tar.bz2
Now that I am told MachineRegisterInfo also tracks physical register uses / defs, I can do away with the horribleness I introduced a while back. It's impossible to detect if there is any use of a physical register below an instruction (and before any def of the register) with some cheap book keeping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/LiveVariables.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index 1e49bab..49fc90f 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -31,11 +31,13 @@
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/ADT/BitVector.h"
+#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
namespace llvm {
+class MachineRegisterInfo;
class TargetRegisterInfo;
class LiveVariables : public MachineFunctionPass {
@@ -128,6 +130,8 @@ private:
private: // Intermediate data structures
MachineFunction *MF;
+ MachineRegisterInfo* MRI;
+
const TargetRegisterInfo *TRI;
// PhysRegInfo - Keep track of which instruction was the last def/use of a
@@ -152,6 +156,10 @@ private: // Intermediate data structures
SmallVector<unsigned, 4> *PHIVarInfo;
+ // DistanceMap - Keep track the distance of a MI from the start of the
+ // current basic block.
+ DenseMap<MachineInstr*, unsigned> DistanceMap;
+
void addRegisterKills(unsigned Reg, MachineInstr *MI,
SmallSet<unsigned, 4> &SubKills);