Skip to content

Commit 2e3ee91

Browse files
committed
Delete ForceEnableGlobalMergeExternalGlobals as it's redundant with global-merge-on-external (thanks Craig!)
1 parent 0496e16 commit 2e3ee91

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

llvm/lib/Target/RISCV/RISCVTargetMachine.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ static cl::opt<cl::boolOrDefault>
5151
EnableGlobalMerge("riscv-enable-global-merge", cl::Hidden,
5252
cl::desc("Enable the global merge pass"));
5353

54-
static cl::opt<bool> DisableGlobalMergeExternalGlobals(
55-
"riscv-disable-global-merge-external-globals", cl::Hidden, cl::init(false),
56-
cl::desc("Disable global merging of external globals"));
57-
5854
static cl::opt<bool>
5955
EnableMachineCombiner("riscv-enable-machine-combiner",
6056
cl::desc("Enable the machine combiner pass"),
@@ -480,8 +476,7 @@ bool RISCVPassConfig::addPreISel() {
480476
// Investigating and addressing both items are TODO.
481477
addPass(createGlobalMergePass(TM, /* MaxOffset */ 2047,
482478
/* OnlyOptimizeForSize */ false,
483-
/* MergeExternalByDefault */
484-
!DisableGlobalMergeExternalGlobals));
479+
/* MergeExternalByDefault */ true));
485480
}
486481

487482
return false;

llvm/test/CodeGen/RISCV/global-merge.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2-
; RUN: llc -mtriple=riscv32 -riscv-disable-global-merge-external-globals \
2+
; RUN: llc -mtriple=riscv32 -global-merge-on-external=false \
33
; RUN: -verify-machineinstrs < %s | FileCheck %s
4-
; RUN: llc -mtriple=riscv64 -riscv-disable-global-merge-external-globals \
4+
; RUN: llc -mtriple=riscv64 -global-merge-on-external=false \
55
; RUN: -verify-machineinstrs < %s | FileCheck %s
66
; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
77
; RUN: | FileCheck -check-prefix=CHECK-WEXTERN %s

0 commit comments

Comments
 (0)