Go to file
Chandler Carruth 9dd96d73f7 [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
clang [NFC] Silence noisy -Wreturn-type warnings 2016-08-06 01:54:50 +00:00
clang-tools-extra [include-fixer] Correct some header mappings. 2016-08-05 11:54:34 +00:00
compiler-rt [sanitizer] allocator: move TransferBatch into SizeClassAllocator64/SizeClassAllocator32 because we actually need different iplementations for the 64- and 32-bit case. NFC; the following patches will make the TransferBatch implementations differ 2016-08-06 01:24:11 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Make min follow the OCL 1.0 specs 2016-07-25 22:36:22 +00:00
libcxx Add MSVC specifics to .gitignore. Patch from STL@microsoft.com 2016-08-03 05:51:19 +00:00
libcxxabi Attempt to bring peace to -Werror buildbots. 2016-07-19 20:35:09 +00:00
libunwind unwind: disable executable stacks 2016-08-05 21:35:28 +00:00
lld [ELF][MIPS] Produce a correct and complete set of MIPS ELF header flags 2016-08-06 05:11:41 +00:00
lldb The lack of classes in the hash table is not an error - it's very legitimately possible for a process to define no ObjC classes of its own. Discovered by debugging /bin/ls 2016-08-06 00:57:07 +00:00
llgo [llgo] add llgo source path to LLVM_GO_PACKAGES 2016-07-27 03:01:00 +00:00
llvm [ADT] Make the triple test 1000x faster through more focused test cases. 2016-08-06 06:00:50 +00:00
openmp Fixed x2APIC discovery for 256-processor architectures. 2016-08-05 15:59:11 +00:00
parallel-libs [StreamExecutor] Add kernel types 2016-08-05 16:05:44 +00:00
polly [CodeGen] Use MapVector instead of DenseMap. 2016-08-05 16:45:51 +00:00