[PATCH] D73725: [DebugInfo] Avoid a quadratic-complexity corner case in LiveDebugValues
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 04:42:12 PST 2020
jmorse updated this revision to Diff 246177.
jmorse marked an inline comment as done.
jmorse added a comment.
Herald added subscribers: ormris, mgorny.
I've added some unit tests; without the patch to LexicalScopes.cpp, these failures occur:
[ RUN ] LexicalScopesTest.TestGetBlocks
/fast/fs/llvm-project/llvm/unittests/CodeGen/LexicalScopesTest.cpp:410: Failure
Expected: NotNestedBlockBlocks.count(MBB3)
Which is: 0
To be equal to: 1u
Which is: 1
[ FAILED ] LexicalScopesTest.TestGetBlocks (1 ms)
[ RUN ] LexicalScopesTest.TestMetaInst
/fast/fs/llvm-project/llvm/unittests/CodeGen/LexicalScopesTest.cpp:452: Failure
Value of: LS.dominates(InBlockLoc.get(), MBB2)
Actual: true
Expected: false
/fast/fs/llvm-project/llvm/unittests/CodeGen/LexicalScopesTest.cpp:453: Failure
Value of: LS.dominates(InBlockLoc.get(), MBB3)
Actual: true
Expected: false
[ FAILED ] LexicalScopesTest.TestMetaInst (0 ms)
Which pass with the patch applied. The other tests are in for just general good coverage. It's generally unclear to me how much bogus / fake / mock implementation to rely on, it might be that manipulating MCInstrDesc structs directly isn't clever. I couldn't see another way of generating instructions without a backend though.
I've also split out some boilerplate code for generating machine functions into MFCommon.inc from the machine instruction tests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73725/new/
https://reviews.llvm.org/D73725
Files:
llvm/lib/CodeGen/LexicalScopes.cpp
llvm/unittests/CodeGen/CMakeLists.txt
llvm/unittests/CodeGen/LexicalScopesTest.cpp
llvm/unittests/CodeGen/MFCommon.inc
llvm/unittests/CodeGen/MachineInstrTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73725.246177.patch
Type: text/x-patch
Size: 34204 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200224/f32d19fc/attachment.bin>
More information about the llvm-commits
mailing list