================
@@ -720,8 +731,14 @@ bool GlobalMergeImpl::run(Module &M) {
 
 Pass *llvm::createGlobalMergePass(const TargetMachine *TM, unsigned Offset,
                                   bool OnlyOptimizeForSize,
-                                  bool MergeExternalByDefault) {
+                                  bool MergeExternalByDefault,
+                                  bool MergePrivateByDefault,
+                                  bool MergeConstantByDefault) {
   bool MergeExternal = (EnableGlobalMergeOnExternal == cl::BOU_UNSET) ?
     MergeExternalByDefault : (EnableGlobalMergeOnExternal == cl::BOU_TRUE);
-  return new GlobalMerge(TM, Offset, OnlyOptimizeForSize, MergeExternal);
+  bool MergeConstant = EnableGlobalMergeOnConst.getNumOccurrences() > 0
+                           ? EnableGlobalMergeOnConst
+                           : MergeConstantByDefault;
----------------
redstar wrote:

```suggestion
  bool MergeConstant = EnableGlobalMergeOnConst || MergeConstantByDefault;
```

https://github.com/llvm/llvm-project/pull/101224
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to