Go to file
Wei Mi 72ec6801b5 [RegisterCoalescer] Limit the number of joins for large live interval with
many valnos.

Recently we found compile time out problem in several cases when
SpeculativeLoadHardening was enabled. The significant compile time was spent
in register coalescing pass, where register coalescer tried to join many other
live intervals with some very large live intervals with many valnos.

Specifically, every time JoinVals::mapValues is called, computeAssignment will
be called by getNumValNums() times of the target live interval. If the large
live interval has N valnos and has N copies associated with it, trying to
coalescing those copies will at least cost N^2 complexity.

The patch adds some limit to the effort trying to join those very large live
intervals with others. By default, for live interval with > 100 valnos, and
when it has been coalesced with other live interval by more than 100 times,
we will stop coalescing for the live interval anymore. That put a compile
time cap for the N^2 algorithm and effectively solves the compile time
problem we saw.

Differential revision: https://reviews.llvm.org/D59143

llvm-svn: 355714
2019-03-08 19:25:32 +00:00
clang [analyzer] Fix infinite recursion in printing macros 2019-03-08 16:26:29 +00:00
clang-tools-extra [clang-tidy] NFC: Negate the name and semantics of the isNotInMacro function. 2019-03-08 15:37:15 +00:00
compiler-rt Reland compiler-rt support for order file instrumentation. 2019-03-08 15:30:56 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
libcxx [runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/ 2019-03-08 05:35:22 +00:00
libcxxabi [runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/ 2019-03-08 05:35:22 +00:00
libunwind [runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/ 2019-03-08 05:35:22 +00:00
lld ELF: Reduce the size of InputSectionBase by two words. NFCI. 2019-03-07 18:48:12 +00:00
lldb [Reproducers] Add missing LLDB_RECORD_DUMMY macros 2019-03-08 19:09:27 +00:00
llgo Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
llvm [RegisterCoalescer] Limit the number of joins for large live interval with 2019-03-08 19:25:32 +00:00
openmp [mips] Use libatomic instead of GCC intrinsics for 64bit 2019-03-08 10:53:19 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [opaque pointer types] Update calls to CreateCall to pass the function 2019-02-08 19:30:46 +00:00
pstl [pstl] Fix missing parallel policy guards 2019-03-01 01:26:35 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.