llvm-6502/test
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
..
Analysis
Archive
Assembler
Bindings/Ocaml
Bitcode
BugPoint
CodeGen MISched: Add SchedDFSResult to ScheduleDAGMI to formalize the 2013-01-25 04:01:04 +00:00
DebugInfo The last of PR14471 - emission of constant floats 2013-01-20 01:18:01 +00:00
ExecutionEngine Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
Feature There was a switch fall-through in the parser for textual LLVM that caused 2013-01-07 13:32:38 +00:00
FileCheck
Instrumentation [asan] adaptive redzones for globals (the larger the global the larger is the redzone) 2013-01-24 10:35:40 +00:00
Integer
JitListener
Linker [IR] Add 'Append' and 'AppendUnique' module flag behaviors. 2013-01-16 21:38:56 +00:00
MC This patch implements parsing the .word 2013-01-25 01:31:34 +00:00
Object [llvm-objdump] Emit addresses with the correct number of leading 0's. 2013-01-10 22:40:50 +00:00
Other llvm/test/Other/close-stderr.ll: Mark this as XFAIL:valgrind. We got 127 instead of 1 here. 2013-01-20 03:35:39 +00:00
Scripts
TableGen
tools
Transforms Switch this code away from Value::isUsedInBasicBlock. That code either 2013-01-25 05:40:09 +00:00
Unit
Verifier [IR] Add 'Append' and 'AppendUnique' module flag behaviors. 2013-01-16 21:38:56 +00:00
YAMLParser
CMakeLists.txt
lit.cfg Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
lit.site.cfg.in Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
Makefile Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
Makefile.tests
TestRunner.sh