summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/DeltaAlgorithm.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-05-14 23:45:56 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-05-14 23:45:56 +0000
commit0925b24d9af3ec37897b850d60c4c9fe17a9fbc0 (patch)
tree591a758769ccee16ad88909c544c51c2f6ff9114 /llvm/lib/Support/DeltaAlgorithm.cpp
parentf21feadcd9fb3d1ae7a1e13427c09abf6697e80d (diff)
downloadbcm5719-llvm-0925b24d9af3ec37897b850d60c4c9fe17a9fbc0.tar.gz
bcm5719-llvm-0925b24d9af3ec37897b850d60c4c9fe17a9fbc0.zip
Speed up Value::isUsedInBasicBlock() for long use lists.
This is expanding Ben's original heuristic for short basic blocks to also work for longer basic blocks and huge use lists. Scan the basic block and the use list in parallel, terminating the search when the shorter list ends. In almost all cases, either the basic block or the use list is short, and the function returns quickly. In one crazy test case with very long use chains, CodeGenPrepare runs 400x faster. When compiling ARMDisassembler.cpp it is 5x faster. <rdar://problem/13840497> llvm-svn: 181851
Diffstat (limited to 'llvm/lib/Support/DeltaAlgorithm.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud