aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/LiveVariables.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-30 21:35:30 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-30 21:35:30 +0000
commitbf98c99600017bfcdde2a7966c47a6beb15a96dc (patch)
tree3e07521a56372988baaa16341f74813e2245f802 /lib/Analysis/LiveVariables.cpp
parentf87a0ccb05eb2aa095ea835fdcdf4a0363637b28 (diff)
Fix horrible non-termination bug in LiveVariables. The issue was that
the liveness state of block-level expressions could oscillate because of two issues: - The initial value before a merge was not always set to "Top" - The set of live block-level expressions is a union, not an intersection This fixes <rdar://problem/650084>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LiveVariables.cpp')
-rw-r--r--lib/Analysis/LiveVariables.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp
index 4c86d44e4d..23f6f461aa 100644
--- a/lib/Analysis/LiveVariables.cpp
+++ b/lib/Analysis/LiveVariables.cpp
@@ -130,7 +130,7 @@ public:
void VisitTerminator(CFGBlock* B);
void SetTopValue(LiveVariables::ValTy& V) {
- V = AD.AlwaysLive;
+ V = AD.AlwaysLive;
}
};
@@ -300,7 +300,7 @@ struct Merge {
void operator()(ValTy& Dst, const ValTy& Src) {
Dst.OrDeclBits(Src);
- Dst.AndBlkExprBits(Src);
+ Dst.OrBlkExprBits(Src);
}
};