diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-23 22:43:58 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-23 22:43:58 +0000 |
commit | dcfe5f30b5e262971f601a65bebcc0367fef56c5 (patch) | |
tree | db54351e744e003a9572e503b6b394cf60a99ac5 /include/llvm/CodeGen/LiveVariables.h | |
parent | 01be611b8223c80305c7c1ce5d9bd578abc844ed (diff) | |
download | external_llvm-dcfe5f30b5e262971f601a65bebcc0367fef56c5.zip external_llvm-dcfe5f30b5e262971f601a65bebcc0367fef56c5.tar.gz external_llvm-dcfe5f30b5e262971f601a65bebcc0367fef56c5.tar.bz2 |
Keep track of phi join registers explicitly in LiveVariables.
Previously, LiveIntervalAnalysis would infer phi joins by looking for multiply
defined registers. That doesn't work if the phi join is implicitly defined in
all but one of the predecessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveVariables.h')
-rw-r--r-- | include/llvm/CodeGen/LiveVariables.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index a7bf600..fc5ea6f 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -124,6 +124,11 @@ private: /// std::vector<VarInfo> VirtRegInfo; + /// PHIJoins - list of virtual registers that are PHI joins. These registers + /// may have multiple definitions, and they require special handling when + /// building live intervals. + SparseBitVector<> PHIJoins; + /// ReservedRegisters - This vector keeps track of which registers /// are reserved register which are not allocatable by the target machine. /// We can not track liveness for values that are in this set. @@ -295,6 +300,12 @@ public: void addNewBlock(MachineBasicBlock *BB, MachineBasicBlock *DomBB, MachineBasicBlock *SuccBB); + + /// isPHIJoin - Return true if Reg is a phi join register. + bool isPHIJoin(unsigned Reg) { return PHIJoins.test(Reg); } + + /// setPHIJoin - Mark Reg as a phi join register. + void setPHIJoin(unsigned Reg) { PHIJoins.set(Reg); } }; } // End llvm namespace |