[llvm] 20cdf7c - [InstCombine] Increase limit for max copied from constant fold

Brendon Cahoon via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 14:08:46 PST 2023


Author: Brendon Cahoon
Date: 2023-02-14T16:04:14-06:00
New Revision: 20cdf7c7066794805546bd33803befb24207ad85

URL: https://github.com/llvm/llvm-project/commit/20cdf7c7066794805546bd33803befb24207ad85
DIFF: https://github.com/llvm/llvm-project/commit/20cdf7c7066794805546bd33803befb24207ad85.diff

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

Increasing the limits fixes several performance regressions.

Differential revision: https://reviews.llvm.org/D144032

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index 41bc65620ff62..33ef15d6784d9 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -32,7 +32,7 @@ STATISTIC(NumDeadStore, "Number of dead stores eliminated");
 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);
 


        


More information about the llvm-commits mailing list