aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2018-08-06 17:30:45 +0000
committerWei Mi <wmi@google.com>2018-08-06 17:30:45 +0000
commit3c1c088500c980e99401189d020d65c79ef10d4a (patch)
tree0d923def3f61cd40174c55f50459e8ff3044ec38 /clang/unittests/Basic/VirtualFileSystemTest.cpp
parent1508dd8b867f8113e96520229fa46c1ce53c9d98 (diff)
downloadllvm-3c1c088500c980e99401189d020d65c79ef10d4a.zip
llvm-3c1c088500c980e99401189d020d65c79ef10d4a.tar.gz
llvm-3c1c088500c980e99401189d020d65c79ef10d4a.tar.bz2
[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
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions