OSDN Git Service

Make bugpoint transform conditional jumps into unconditional jumps.
authorDaniel Berlin <dberlin@dberlin.org>
Wed, 27 Jul 2016 16:13:25 +0000 (16:13 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Wed, 27 Jul 2016 16:13:25 +0000 (16:13 +0000)
commit41bc5c29c9be01463cd7c8bb8481a88c1b17e4de
tree679dcfdcf43125112be6870aeaf38aa3ee5bf1a9
parent12e910f70a395f7c49fe0f21b4a157d9bb7679a7
Make bugpoint transform conditional jumps into unconditional jumps.

Summary:
Add a pass to bugpoint to make it transform conditional jumps into unconditional jumps.

Often, bugpoint generates output that has large numbers of br undef jumps, where
one side is dead.

What is happening is two fold:
1. It never tries to just pick a direction for the jump, and just see what happens
<<<< this patch

2. SimplifyCFG no longer is a good match for bugpoint's usecase. It
does too much.
Even things in SimplifyCFG, like removeUnreachableBlocks, go to great
lengths to transform undefined behavior into  blocks and kill large
parts of the CFG.  This is great for regular code, not so much for
bugpoint, which often generates UB on purpose (store undef is a great
example).
<<<< a followup patch that is coming, to move simplifycfg into a
separate reduction pass, and move the existing reduceCrashingBlocks
pass to use simpleSimplifyCFG.

Both of these patches significantly reduce the size and complexity of bugpoint
generated testcases.

Reviewers: chandlerc, majnemer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22841

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276884 91177308-0d34-0410-b5e6-96231b3b80d8
tools/bugpoint/CrashDebugger.cpp