mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
80365b065d
Way back in D24994, the combination of LexicalScopes::dominates and LiveDebugValues was identified as having worst-case quadratic complexity, but it wasn't triggered by any code path at the time. I've since run into a scenario where this occurs, in a very large basic block where large numbers of inlined DBG_VALUEs are present. The quadratic-ness comes from LiveDebugValues::join calling "dominates" on every variable location, and LexicalScopes::dominates potentially touching every instruction in a block to test for the presence of a scope. We have, however, already computed the presence of scopes in blocks, in the "InstrRanges" of each scope. This patch switches the dominates method to examine whether a block is present in a scope's InsnRanges, avoiding walking through the whole block. At the same time, fix getMachineBasicBlocks to account for the fact that InsnRanges can cover multiple blocks, and add some unit tests, as Lexical Scopes didn't have any. Differential revision: https://reviews.llvm.org/D73725
29 lines
480 B
CMake
29 lines
480 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
Analysis
|
|
AsmParser
|
|
AsmPrinter
|
|
CodeGen
|
|
Core
|
|
MC
|
|
MIRParser
|
|
SelectionDAG
|
|
Support
|
|
Target
|
|
)
|
|
|
|
add_llvm_unittest(CodeGenTests
|
|
AArch64SelectionDAGTest.cpp
|
|
DIEHashTest.cpp
|
|
LowLevelTypeTest.cpp
|
|
LexicalScopesTest.cpp
|
|
MachineInstrBundleIteratorTest.cpp
|
|
MachineInstrTest.cpp
|
|
MachineOperandTest.cpp
|
|
ScalableVectorMVTsTest.cpp
|
|
TypeTraitsTest.cpp
|
|
TargetOptionsTest.cpp
|
|
)
|
|
|
|
add_subdirectory(GlobalISel)
|