1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/lib
Wei Mi 63084224da [RegisterCoalescer] Delay live interval update work until the rematerialization
for all the uses from the same def is done.

We run into a compile time problem with flex generated code combined with
`-fno-jump-tables`. The cause is that machineLICM hoists a lot of invariants
outside of a big loop, and drastically increases the compile time in global
register splitting and copy coalescing.  https://reviews.llvm.org/D49353
relieves the problem in global splitting. This patch is to handle the problem
in copy coalescing.

About the situation where the problem in copy coalescing happens. After
machineLICM, we have several defs outside of a big loop with hundreds or
thousands of uses inside the loop. Rematerialization in copy coalescing
happens for each use and everytime rematerialization is done, shrinkToUses
will be called to update the huge live interval. Because we have 'n' uses
for a def, and each live interval update will have at least 'n' complexity,
the total update work is n^2.

To fix the problem, we try to do the live interval update work in a collective
way. If a def has many copylike uses larger than a threshold, each time
rematerialization is done for one of those uses, we won't do the live interval
update in time but delay that work until rematerialization for all those uses
are completed, so we only have to do the live interval update work once.

Delaying the live interval update could potentially change the copy coalescing
result, so we hope to limit that change to those defs with many
(like above a hundred) copylike uses, and the cutoff can be adjusted by the
option -mllvm -late-remat-update-threshold=xxx.

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

llvm-svn: 339035
2018-08-06 17:30:45 +00:00
..
Analysis ValueTracking: Handle canonicalize in CannotBeNegativeZero 2018-08-06 15:16:26 +00:00
AsmParser [DEBUGINFO] Disable emission of the dwarf sections, but allow directives. 2018-08-01 19:38:20 +00:00
BinaryFormat [dwarfdump] Add pretty printer for accelerator table based on Atom. 2018-07-13 17:21:51 +00:00
Bitcode [NFC] Fix typo 2018-08-06 05:03:21 +00:00
CodeGen [RegisterCoalescer] Delay live interval update work until the rematerialization 2018-08-06 17:30:45 +00:00
DebugInfo [DebugInfo/Verifier] Don't emit error for missing module in index 2018-08-03 12:01:43 +00:00
Demangle [itanium demangler] Support dot suffixes on block invocation functions 2018-08-02 17:45:01 +00:00
ExecutionEngine [ORC] Remove an incorrect use of 'cantFail'. 2018-08-05 23:55:35 +00:00
Fuzzer
FuzzMutate Remove trailing space 2018-07-30 19:41:25 +00:00
IR [DebugInfo] Refactor DbgInfoIntrinsic class hierarchy. 2018-08-06 03:59:47 +00:00
IRReader
LineEditor
Linker [NFC] Remove an empty line. 2018-07-27 06:50:45 +00:00
LTO Remove trailing space 2018-07-30 19:41:25 +00:00
MC Revert "Add a warning if someone attempts to add extra section flags to sections" 2018-08-05 14:23:37 +00:00
Object Remove trailing space 2018-07-30 19:41:25 +00:00
ObjectYAML [CodeView] Minimal support for S_UNAMESPACE records 2018-07-31 19:15:50 +00:00
Option Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
Passes Revert "[GVNHoist] Re-enable GVNHoist by default" 2018-07-30 20:07:33 +00:00
ProfileData [InstrProf] Use comdats on COFF for available_externally functions 2018-07-26 22:59:17 +00:00
Support Fix raw_fd_ostream::write_impl hang due to an infinite loop with large output 2018-08-06 16:21:41 +00:00
TableGen Remove trailing space 2018-07-30 19:41:25 +00:00
Target AMDGPU: Fold v_lshl_or_b32 with 0 src0 2018-08-06 15:40:20 +00:00
Testing [LLVMTestingSupport] Add explicit linkage to LLVMSupport 2018-04-08 06:49:17 +00:00
ToolDrivers Give llvm-lib rudimentary help output. 2018-07-14 02:29:44 +00:00
Transforms [NFC] Fixed unused function warnings 2018-08-06 15:09:15 +00:00
WindowsManifest Convert line endings of lib/WindowsManifest/CMakeLists.txt to unix. 2018-04-07 04:28:08 +00:00
XRay Reverted r338825 and all the following tries to fix issues introduced by that commit (r338826, r338827, r338829, r338880). 2018-08-04 01:59:12 +00:00
CMakeLists.txt
LLVMBuild.txt