[PATCH] D150994: Bump coalescing limit

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 13:17:08 PDT 2023


MatzeB created this revision.
MatzeB added reviewers: wmi, qcolombet.
Herald added subscribers: modimo, wenlei, tpr, hiraditya, mcrosier.
Herald added a project: All.
MatzeB requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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. It can be other projects such as 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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150994

Files:
  llvm/lib/CodeGen/RegisterCoalescer.cpp


Index: llvm/lib/CodeGen/RegisterCoalescer.cpp
===================================================================
--- llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -116,7 +116,7 @@
     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 {
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150994.523904.patch
Type: text/x-patch
Size: 483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230519/c8337d2a/attachment.bin>


More information about the llvm-commits mailing list