diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-01-30 21:35:30 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-01-30 21:35:30 +0000 |
commit | 378e7fd330d9b0328fd2d20f6edab9006eb43dd3 (patch) | |
tree | 2b1254f4115e07349f6452e6c40d2fff381ea537 /clang/lib/Analysis/LiveVariables.cpp | |
parent | 35972a9460975bca008d3fe4a0736f725f67dc47 (diff) | |
download | bcm5719-llvm-378e7fd330d9b0328fd2d20f6edab9006eb43dd3.tar.gz bcm5719-llvm-378e7fd330d9b0328fd2d20f6edab9006eb43dd3.zip |
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>.
llvm-svn: 63421
Diffstat (limited to 'clang/lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | clang/lib/Analysis/LiveVariables.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index 4c86d44e4db..23f6f461aa1 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/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); } }; |