[llvm] 7ac63f0 - Bump coalescing limit
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 09:15:28 PDT 2023
Author: Matthias Braun
Date: 2023-05-24T09:15:05-07:00
New Revision: 7ac63f004ca6c4905201036647fcacfcbb1c7ade
URL: https://github.com/llvm/llvm-project/commit/7ac63f004ca6c4905201036647fcacfcbb1c7ade
DIFF: https://github.com/llvm/llvm-project/commit/7ac63f004ca6c4905201036647fcacfcbb1c7ade.diff
LOG: Bump coalescing limit
This bumps the "large-interval-freq-threshold" limit in the register
coalescer to 256. The limit was introduced in
https://reviews.llvm.org/D59143 without much justify for the particular
value "100", so I hope bumping it is ok.
This change is motivated by bad codegen for the popular crc32c
algorithm; the code is often based/copied from this implementation:
https://github.com/htot/crc32c/blob/master/crc32c/crc32intelc.cc which
uses a duffs-device pattern with 128 switch-cases. There are examples in
RocksDB (https://github.com/facebook/rocksdb/blob/main/util/crc32c.cc)
and Folly
(https://github.com/facebook/folly/blob/main/folly/hash/detail/Crc32cDetail.cpp)
which are important use cases for us.
Differential Revision: https://reviews.llvm.org/D150994
Added:
Modified:
llvm/lib/CodeGen/RegisterCoalescer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 87a4ace6cb34..c0c07bc817ac 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -116,7 +116,7 @@ static cl::opt<unsigned> LargeIntervalFreqThreshold(
cl::desc("For a large interval, if it is coalesed with other live "
"intervals many times more than the threshold, stop its "
"coalescing to control the compile time. "),
- cl::init(100));
+ cl::init(256));
namespace {
More information about the llvm-commits
mailing list