llvm-project/llvm/unittests/CodeGen
Jeremy Morse 6af859dcca [DebugInfo] Re-implement LexicalScopes dominance method, add unit tests
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
2020-02-28 11:41:28 +00:00
..
GlobalISel [GISel][KnownBits] Update a comment regarding the effect of cache on PHIs 2020-02-25 15:56:15 -08:00
AArch64SelectionDAGTest.cpp [PGO][PGSO] DAG.shouldOptForSize part. 2019-11-21 14:16:00 -08:00
CMakeLists.txt [DebugInfo] Re-implement LexicalScopes dominance method, add unit tests 2020-02-28 11:41:28 +00:00
DIEHashTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LexicalScopesTest.cpp [DebugInfo] Re-implement LexicalScopes dominance method, add unit tests 2020-02-28 11:41:28 +00:00
LowLevelTypeTest.cpp LLT: Add changeNumElements 2020-01-29 07:32:07 -08:00
MFCommon.inc [DebugInfo] Re-implement LexicalScopes dominance method, add unit tests 2020-02-28 11:41:28 +00:00
MachineInstrBundleIteratorTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachineInstrTest.cpp [DebugInfo] Re-implement LexicalScopes dominance method, add unit tests 2020-02-28 11:41:28 +00:00
MachineOperandTest.cpp Revert "Revert "[MIR] Target specific MIR formating and parsing"" 2020-01-08 20:03:29 -08:00
ScalableVectorMVTsTest.cpp [SVE][CodeGen] Scalable vector MVT size queries 2019-11-18 12:30:59 +00:00
TargetOptionsTest.cpp [unittests] Add InitializePasses.h includes 2019-11-13 19:42:58 -08:00
TypeTraitsTest.cpp Update files that were mistakenly added with the old file header. 2019-02-11 08:07:32 +00:00