diff options
author | Sean Silva <chisophugis@gmail.com> | 2016-07-06 19:05:41 +0000 |
---|---|---|
committer | Sean Silva <chisophugis@gmail.com> | 2016-07-06 19:05:41 +0000 |
commit | f50d4b6cdcbe0e8f20275bc040018bfb1d593eff (patch) | |
tree | 42b167ec0fca50b7f2e72d1917ef1193ff334f97 /llvm/lib/Transforms/Scalar/JumpThreading.cpp | |
parent | f16acbd2f983adaa285f6d38c8a4302ebfc64c19 (diff) | |
download | bcm5719-llvm-f50d4b6cdcbe0e8f20275bc040018bfb1d593eff.tar.gz bcm5719-llvm-f50d4b6cdcbe0e8f20275bc040018bfb1d593eff.zip |
Work around PR28400 a bit harder.
We were still crashing in the "no change" case because LVI was not
getting invalidated.
See the thread "Should analyses be able to hold AssertingVH to IR?
(related to PR28400)" for more discussion.
llvm-svn: 274656
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 8e6020bb22e..d0266b8bf7e 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -148,11 +148,14 @@ PreservedAnalyses JumpThreadingPass::run(Function &F, } bool Changed = runImpl(F, &TLI, &LVI, HasProfileData, std::move(BFI), std::move(BPI)); + + // FIXME: We need to invalidate LVI to avoid PR28400. Is there a better + // solution? + AM.invalidate<LazyValueAnalysis>(F); + if (!Changed) return PreservedAnalyses::all(); PreservedAnalyses PA; - // FIXME: Not preserving LVI! We need it to be invalidated so that we - // don't run into issues like PR28400. Is there a better solution? PA.preserve<GlobalsAA>(); return PA; } |