[PATCH] D22841: Add a pass to bugpoint to make it transform conditional jumps into unconditional jumps.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 18:28:26 PDT 2016


dberlin created this revision.
dberlin added reviewers: chandlerc, majnemer.
dberlin added a subscriber: llvm-commits.

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.

https://reviews.llvm.org/D22841

Files:
  tools/bugpoint/CrashDebugger.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22841.65640.patch
Type: text/x-patch
Size: 6797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160727/8294e907/attachment.bin>


More information about the llvm-commits mailing list