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
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
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp ConstantFolding: Add a missing folding that leads to a miscompile. 2013-01-24 16:28:28 +00:00
CorrelatedValuePropagation
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
GlobalDCE
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
IPConstantProp
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
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
LoopStrengthReduce Remove target triple from an LSR test. 2013-01-22 00:57:16 +00:00
LoopUnroll
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
LowerExpectIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg
MemCpyOpt
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
PruneEH
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
Sink
SROA
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