summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2017-02-17 04:21:14 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2017-02-17 04:21:14 +0000
commit8b859c26eccc8e292356376a83f4bcfefe36a6c0 (patch)
tree5f58b355e6acb74a64e67ec5cb133290ce8069cf /lldb/packages/Python/lldbsuite
parenta0921f68abafaff891ca3d5ee33a7f2d0fba41ee (diff)
downloadbcm5719-llvm-8b859c26eccc8e292356376a83f4bcfefe36a6c0.tar.gz
bcm5719-llvm-8b859c26eccc8e292356376a83f4bcfefe36a6c0.zip
[JumpThreading] Re-enable JumpThreading for guards
Summary: JumpThreading for guards feature has been reverted at https://reviews.llvm.org/rL295200 due to the following problem: the feature used the following algorithm for detection of diamond patters: 1. Find a block with 2 predecessors; 2. Check that these blocks have a common single parent; 3. Check that the parent's terminator is a branch instruction. The problem is that these checks are insufficient. They may pass for a non-diamond construction in case if those two predecessors are actually the same block. This may happen if parent's terminator is a br (either conditional or unconditional) to a block that ends with "switch" instruction with exactly two branches going to one block. This patch re-enables the JumpThreading for guards and fixes this issue by adding the check that those found predecessors are actually different blocks. This guarantees that parent's terminator is a conditional branch with exactly 2 different successors, which is now ensured by assertions. It also adds two more tests for this situation (with parent's terminator being a conditional and an unconditional branch). Patch by Max Kazantsev! Reviewers: anna, sanjoy, reames Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30036 llvm-svn: 295410
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud