diff options
author | Dinesh Dwivedi <dinesh.d@samsung.com> | 2014-06-17 14:34:19 +0000 |
---|---|---|
committer | Dinesh Dwivedi <dinesh.d@samsung.com> | 2014-06-17 14:34:19 +0000 |
commit | 657105e582ed9d3c95ebe9b721aae1f6def92567 (patch) | |
tree | 3e5834311a216d9b9903c9bf455488b15ed6e540 /llvm/lib | |
parent | 2e940a11e7c64718d36955e4ca68fa87aa9d5a9d (diff) | |
download | bcm5719-llvm-657105e582ed9d3c95ebe9b721aae1f6def92567.tar.gz bcm5719-llvm-657105e582ed9d3c95ebe9b721aae1f6def92567.zip |
Fixed jump threading going to infinite loop.
This patch add code to remove unreachable blocks from function
as they may cause jump threading to stuck in infinite loop.
Differential Revision: http://reviews.llvm.org/D3991
llvm-svn: 211103
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 230a381593e..e501ff29d03 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -158,6 +158,9 @@ bool JumpThreading::runOnFunction(Function &F) { TLI = &getAnalysis<TargetLibraryInfo>(); LVI = &getAnalysis<LazyValueInfo>(); + // Remove unreachable blocks from function as they may result in infinite loop. + removeUnreachableBlocks(F); + FindLoopHeaders(F); bool Changed, EverChanged = false; |