summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveInterval.h
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
commite0a73ec0a982a4213f3de9860545d9bf2814593d (patch)
tree92d56c1b7c96ef12f00aa455a10f472b4f807e7c /include/llvm/CodeGen/LiveInterval.h
parenta9b85c1074dd91ef6702b4c13499c5900616ad02 (diff)
downloadllvm-e0a73ec0a982a4213f3de9860545d9bf2814593d.tar.gz
llvm-e0a73ec0a982a4213f3de9860545d9bf2814593d.tar.bz2
llvm-e0a73ec0a982a4213f3de9860545d9bf2814593d.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index 706d449516..720fb830e4 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/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.