summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-01 23:52:25 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-01 23:52:25 +0000
commit28792c4a3dfc458c79877ff04534bae993c333dc (patch)
tree5486f2db41830f6a82d25b39eb7a55d3d51b0d65 /llvm/include
parent8fd5b3c071b1ded29ecb9a0031c9ecf633bfb1e9 (diff)
downloadbcm5719-llvm-28792c4a3dfc458c79877ff04534bae993c333dc.tar.gz
bcm5719-llvm-28792c4a3dfc458c79877ff04534bae993c333dc.zip
When RemoveCopyByCommutingDef is creating additional identity copies, just use
LiveInterval::MergeValueNumberInto instead of trying to extend LiveRanges and getting it wrong. This fixed PR8249 where a valno with a multi-segment live range was defined by an identity copy created by RemoveCopyByCommutingDef. Some of the live segments disappeared. llvm-svn: 115385
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/CodeGen/LiveInterval.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/LiveInterval.h b/llvm/include/llvm/CodeGen/LiveInterval.h
index 706d4495169..720fb830e47 100644
--- a/llvm/include/llvm/CodeGen/LiveInterval.h
+++ b/llvm/include/llvm/CodeGen/LiveInterval.h
@@ -81,6 +81,11 @@ namespace llvm {
unsigned getFlags() const { return flags; }
void setFlags(unsigned flags) { this->flags = flags; }
+ /// Merge flags from another VNInfo
+ void mergeFlags(const VNInfo *VNI) {
+ flags = (flags | VNI->flags) & ~IS_UNUSED;
+ }
+
/// For a register interval, if this VN was definied by a copy instr
/// getCopy() returns a pointer to it, otherwise returns 0.
/// For a stack interval the behaviour of this method is undefined.
OpenPOWER on IntegriCloud