llvm-6502/test/Transforms
Chandler Carruth baf868b9b8 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173417 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 05:40:09 +00:00
..
ADCE 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
ArgumentPromotion Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
BBVectorize Switch BBVectorize to directly depend on having a TTI analysis. 2013-01-07 10:22:36 +00:00
BlockPlacement 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
BranchFolding
CodeExtractor 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
CodeGenPrepare Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
ConstantMerge Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
ConstProp ConstantFolding: Add a missing folding that leads to a miscompile. 2013-01-24 16:28:28 +00:00
CorrelatedValuePropagation CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. If the it's the condition of a SwitchInst, reload it. 2012-09-28 10:42:50 +00:00
DeadArgElim Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
DeadStoreElimination Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
EarlyCSE There was a switch fall-through in the parser for textual LLVM that caused 2013-01-07 13:32:38 +00:00
FunctionAttrs Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
GlobalDCE 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
GlobalOpt Fix TryToShrinkGlobalToBoolean in GlobalOpt, so that it does not discard address spaces. 2013-01-10 10:31:11 +00:00
GVN Memory Dependence Analysis: fix a miscompile that uses DT to approxmiate the 2013-01-04 19:19:47 +00:00
IndVarSimplify Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
Inline Add the IR attribute 'sspstrong'. 2013-01-23 06:41:41 +00:00
InstCombine ConstantFolding: Add a missing folding that leads to a miscompile. 2013-01-24 16:28:28 +00:00
InstSimplify Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
Internalize Change the internalize pass to internalize all symbols when given an empty 2012-10-26 18:47:48 +00:00
IPConstantProp Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
JumpThreading Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
LCSSA Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
LICM LICM: Hoist insertvalue/extractvalue out of loops. 2013-01-09 18:12:03 +00:00
LoopDeletion Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
LoopIdiom PR14904: Segmentation fault running pass 'Recognize loop idioms' 2013-01-10 23:32:01 +00:00
LoopRotate Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
LoopSimplify Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
LoopStrengthReduce Remove target triple from an LSR test. 2013-01-22 00:57:16 +00:00
LoopUnroll Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call. 2012-12-20 16:04:27 +00:00
LoopUnswitch Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
LoopVectorize Add support for reverse pointer induction variables. These are loops that contain pointers that count backwards. 2013-01-23 01:35:00 +00:00
LowerAtomic 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
LowerExpectIntrinsic 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
LowerInvoke 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
LowerSwitch PR1255 related changes (case ranges): 2012-05-24 09:33:20 +00:00
Mem2Reg 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
MemCpyOpt In my recent change to avoid use of underaligned memory I didn't notice that 2012-10-04 13:53:21 +00:00
MergeFunc CastInst::castIsValid should return true if the dest type is the same as 2013-01-10 23:22:53 +00:00
MetaRenamer Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
ObjCARC Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-22 14:39:21 +00:00
PhaseOrdering Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
PruneEH The normal edge of an invoke is not allowed to branch to a block with a 2012-08-10 20:55:20 +00:00
Reassociate Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
Reg2Mem Make sure we don't emit instructions before a landingpad instruction. 2013-01-08 10:51:32 +00:00
ScalarRepl Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
SCCP Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
SimplifyCFG Switch this code away from Value::isUsedInBasicBlock. That code either 2013-01-25 05:40:09 +00:00
SimplifyLibCalls Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
Sink Enhance the sinking code to handle diamond patterns. Patch by 2012-05-31 08:09:49 +00:00
SROA Rename the test so that we can add additional vectors-of-pointers tests 2012-12-18 05:50:54 +00:00
StripSymbols Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2013-01-01 13:57:25 +00:00
TailCallElim Converted test dont-tce-tail-marked-call.ll to use FileCheck. 2013-01-11 04:16:35 +00:00
TailDup Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00