[PATCH] D144032: [InstCombine] Increase limit for max copied from constant fold

Brendon Cahoon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 10:27:37 PST 2023


bcahoon created this revision.
bcahoon added reviewers: gandhi21299, nikic.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
bcahoon requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Increasing the limits fixes several performance regressions on internal applications. The new threshold is large enough to fix the regressions.

I have not included a test case as it would be large and I'm not sure how useful it would. I can include one if needed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144032

Files:
  llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp


Index: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
===================================================================
--- llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -32,7 +32,7 @@
 STATISTIC(NumGlobalCopies, "Number of allocas copied from constant global");
 
 static cl::opt<unsigned> MaxCopiedFromConstantUsers(
-    "instcombine-max-copied-from-constant-users", cl::init(128),
+    "instcombine-max-copied-from-constant-users", cl::init(300),
     cl::desc("Maximum users to visit in copy from constant transform"),
     cl::Hidden);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144032.497381.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230214/2c5a5222/attachment.bin>


More information about the llvm-commits mailing list