summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveRangeEdit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-17 20:37:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-17 20:37:07 +0000
commit8630840c30a99e54414c0ee9b39928813301dcfc (patch)
tree72387a2f78bd3a5a2c92d3ba40eca404749dd3d5 /llvm/lib/CodeGen/LiveRangeEdit.h
parent35944dda103ed588b68970c24bcd79b26d1b2dfd (diff)
downloadbcm5719-llvm-8630840c30a99e54414c0ee9b39928813301dcfc.tar.gz
bcm5719-llvm-8630840c30a99e54414c0ee9b39928813301dcfc.zip
Dead code elimination may separate the live interval into multiple connected components.
I have convinced myself that it can only happen when a phi value dies. When it happens, allocate new virtual registers for the components. llvm-svn: 127827
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.h')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.h b/llvm/lib/CodeGen/LiveRangeEdit.h
index 2bd34611c24..0846961f5b9 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.h
+++ b/llvm/lib/CodeGen/LiveRangeEdit.h
@@ -65,6 +65,9 @@ private:
/// live range trimmed or entirely removed.
SmallPtrSet<const VNInfo*,4> rematted_;
+ /// createFrom - Create a new virtual register based on OldReg.
+ LiveInterval &createFrom(unsigned, LiveIntervals&, VirtRegMap &);
+
/// scanRemattable - Identify the parent_ values that may rematerialize.
void scanRemattable(LiveIntervals &lis,
const TargetInstrInfo &tii,
@@ -110,9 +113,11 @@ public:
return uselessRegs_;
}
- /// create - Create a new register with the same class and stack slot as
+ /// create - Create a new register with the same class and original slot as
/// parent.
- LiveInterval &create(MachineRegisterInfo&, LiveIntervals&, VirtRegMap&);
+ LiveInterval &create(LiveIntervals &LIS, VirtRegMap &VRM) {
+ return createFrom(getReg(), LIS, VRM);
+ }
/// anyRematerializable - Return true if any parent values may be
/// rematerializable.
@@ -166,7 +171,7 @@ public:
/// (allDefsAreDead returns true). This may cause live intervals to be trimmed
/// and further dead efs to be eliminated.
void eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead,
- LiveIntervals&,
+ LiveIntervals&, VirtRegMap&,
const TargetInstrInfo&);
};
OpenPOWER on IntegriCloud