1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/unittests
Chandler Carruth a0e0d32a56 [ADT] Make the triple test 1000x faster through more focused test cases.
The current approach isn't a long-term viable pattern. Given the set of
architectures A, vendors V, operating systems O, and environments E, it
does |A| * |V| * |O| * |E| * 4! tests. As LLVM grows, this test keeps
getting slower, despite my working very hard to make it get some
"optimizations" even in -O0 builds in order to lower the constant
factors. Fundamentally, we're doing an unreasonable amount of work.i

Looking at the specific thing being tested -- the goal seems very
clearly to be testing the *permutations*, not the *combinations*. The
combinations are driving up the complexity much more than anything else.

Instead, test every possible value for a given triple entry in every
permutation of *some* triple. This really seems to cover the core goal
of the test. Every single possible triple component is tested in every
position. But because we keep the rest of the triple constant, it does
so in a dramatically more scalable amount of time. With this model we do
(|A| + |V| + |O| + |E|) * 4! tests.

For me on a debug build, this goes from running for 19 seconds to 19
milliseconds, or a 1000x improvement. This makes a world of difference
for the critical path of 'ninja check-llvm' and other extremely common
workflows.

Thanks to Renato, Dean, and David for the helpful review comments and
helping me refine the explanation of the change.

Differential Revision: https://reviews.llvm.org/D23156

llvm-svn: 277912
2016-08-06 06:00:50 +00:00
..
ADT [ADT] Make the triple test 1000x faster through more focused test cases. 2016-08-06 06:00:50 +00:00
Analysis [PM] Sink the module parsing from the fixture to the test as subsequent 2016-06-28 00:38:42 +00:00
AsmParser
Bitcode
CodeGen GlobalISel: refuse to halve size of 1-byte & odd-sized LLTs. 2016-08-04 20:54:05 +00:00
DebugInfo [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
ExecutionEngine [ExecutionEngine][MCJIT][Orc] Replace RuntimeDyld::SymbolInfo with JITSymbol. 2016-08-01 20:49:11 +00:00
IR IR: Drop uniquing when an MDNode Value operand is deleted 2016-08-03 18:19:43 +00:00
LineEditor
Linker Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
MC
MI MIRParser: Use dot instead of colon to mark subregisters 2016-07-26 21:49:34 +00:00
ObjectYAML
Option
ProfileData Rename StringMap::emplace_second to try_emplace. 2016-07-21 13:37:48 +00:00
Support Fix TargetParser unit tests for ARM / AArch64. 2016-08-05 16:45:07 +00:00
Transforms [MSSA] clang-format. NFC. 2016-08-03 19:59:11 +00:00
CMakeLists.txt