1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/test/Transforms/SimplifyCFG
Chandler Carruth 0e2f6c4f00 Switch this code away from Value::isUsedInBasicBlock. That code either
loops over instructions in the basic block or the use-def list of the
value, neither of which are really efficient when repeatedly querying
about values in the same basic block.

What's more, we already know that the CondBB is small, and so we can do
a much more efficient test by counting the uses in CondBB, and seeing if
those account for all of the uses.

Finally, we shouldn't blanket fail on any such instruction, instead we
should conservatively assume that those instructions are part of the
cost.

Note that this actually fixes a bug in the pass because
isUsedInBasicBlock has a really terrible bug in it. I'll fix that in my
next commit, but the fix for it would make this code suddenly take the
compile time hit I thought it already was taking, so I wanted to go
ahead and migrate this code to a faster & better pattern.

The bug in isUsedInBasicBlock was also causing other tests to test the
wrong thing entirely: for example we weren't actually disabling
speculation for floating point operations as intended (and tested), but
the test passed because we failed to speculate them due to the
isUsedInBasicBlock failure.

llvm-svn: 173417
2013-01-25 05:40:09 +00:00
..
SPARC Use TargetTransformInfo to control switch-to-lookup table transformation 2012-10-30 11:23:25 +00:00
X86 Fix logic to determine whether to turn a switch into a lookup table. When 2012-11-30 02:02:42 +00:00
2002-05-05-EmptyBlockMerge.ll Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
2002-05-21-PHIElimination.ll
2002-06-24-PHINode.ll
2002-09-24-PHIAssertion.ll
2003-03-07-DominateProblem.ll
2003-08-05-InvokeCrash.ll
2003-08-17-BranchFold.ll Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
2003-08-17-BranchFoldOrdering.ll Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
2003-08-17-FoldSwitch-dbg.ll
2003-08-17-FoldSwitch.ll
2004-12-10-SimplifyCFGCrash.ll
2005-06-16-PHICrash.ll
2005-08-01-PHIUpdateFail.ll
2005-10-02-InvokeSimplify.ll
2005-12-03-IncorrectPHIFold.ll
2006-02-17-InfiniteUnroll.ll
2006-06-12-InfLoop.ll
2006-08-03-Crash.ll
2006-10-19-UncondDiv.ll
2006-12-08-Ptr-ICmp-Branch.ll
2007-11-22-InvokeNoUnwind.ll
2007-12-21-Crash.ll
2008-01-02-hoist-fp-add.ll Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
2008-05-16-PHIBlockMerge.ll Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
2008-07-13-InfLoopMiscompile.ll Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
2008-09-08-MultiplePred.ll
2008-09-17-SpeculativeHoist.ll
2008-10-03-SpeculativelyExecuteBeforePHI.ll
2008-12-06-SingleEntryPhi.ll
2008-12-16-DCECond.ll
2009-01-18-PHIPropCrash.ll
2009-01-19-UnconditionalTrappingConstantExpr.ll Fix SpeculativelyExecuteBB to either speculate all or none of the phis 2012-01-05 23:58:56 +00:00
2009-05-12-externweak.ll
2010-03-30-InvokeCrash.ll Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
2011-03-08-UnreachableUse.ll
2011-09-05-TrivialLPad.ll
basictest.ll
branch-cond-merge.ll
branch-cond-prop.ll
branch-fold-dbg.ll Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
branch-fold-test.ll
branch-fold.ll Remove dyn_cast + dereference pattern by replacing it with a cast and changing 2012-06-24 10:15:42 +00:00
branch-phi-thread.ll Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
BrUnwind.ll Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
dbginfo.ll
dce-cond-after-folding-terminator.ll
DeadSetCC.ll Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
duplicate-phis.ll Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
EqualPHIEdgeBlockMerge.ll
ForwardSwitchConditionToPHI.ll
hoist-common-code.ll
hoist-dbgvalue.ll
HoistCode.ll
indirectbr.ll
invoke_unwind.ll
invoke.ll fix PR13339 (remove the predecessor from the unwind BB when removing an invoke) 2012-07-16 22:49:40 +00:00
iterative-simplify.ll
lifetime.ll
lit.local.cfg Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed. 2012-02-16 06:28:33 +00:00
MagicPointer.ll
multiple-phis.ll Fix SpeculativelyExecuteBB to either speculate all or none of the phis 2012-01-05 23:58:56 +00:00
noreturn-call.ll
phi-undef-loadstore.ll SimplifyCFG: Enhance the "remove CFG edge that leads to null pointer dereference" optimization to also handle instructions with multiple uses. 2012-10-04 16:11:49 +00:00
PhiBlockMerge2.ll
PhiBlockMerge.ll
PhiEliminate2.ll
PhiEliminate3.ll
PhiEliminate.ll
PhiNoEliminate.ll
PR9946.ll Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
preserve-branchweights-partial.ll Remove an incorrect assert during branch weight propagation. 2012-09-08 00:07:26 +00:00
preserve-branchweights-switch-create.ll PGO: preserve branch-weight metadata when merging two switches where 2012-09-14 17:29:56 +00:00
preserve-branchweights.ll PGO: preserve branch-weight metadata when simplifying Switch to a sub, an icmp 2012-09-18 00:47:33 +00:00
return-merge.ll
select-gep.ll Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
sink-common-code.ll SimplifyCFG: sink common codes from IF, ELSE blocks down to END block. 2012-09-20 22:37:36 +00:00
speculate-with-offset.ll
SpeculativeExec.ll Switch this code away from Value::isUsedInBasicBlock. That code either 2013-01-25 05:40:09 +00:00
switch_create.ll Only do switch-to-lookup table transformation when TargetTransformInfo 2012-11-07 21:35:12 +00:00
switch_switch_fold.ll
switch_thread.ll Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
switch-masked-bits.ll Fix SpeculativelyExecuteBB to either speculate all or none of the phis 2012-01-05 23:58:56 +00:00
switch-on-const-select.ll Fix SpeculativelyExecuteBB to either speculate all or none of the phis 2012-01-05 23:58:56 +00:00
switch-simplify-crash.ll
switch-to-icmp.ll
trap-debugloc.ll
trapping-load-unreachable.ll
two-entry-phi-return.ll
UncondBranchToReturn.ll Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
unreachable-blocks.ll Make Value::isDereferenceablePointer() handle unreachable code blocks. (This 2012-01-23 00:05:17 +00:00
UnreachableEliminate.ll