File tree Expand file tree Collapse file tree 6 files changed +19
-29
lines changed Expand file tree Collapse file tree 6 files changed +19
-29
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,6 @@ static cl::opt<cl::boolOrDefault>
51
51
EnableGlobalMerge (" riscv-enable-global-merge" , cl::Hidden,
52
52
cl::desc (" Enable the global merge pass" ));
53
53
54
- static cl::opt<bool > ForceEnableGlobalMergeExternalGlobals (
55
- " riscv-force-enable-global-merge-external-globals" , cl::Hidden,
56
- cl::init (false ),
57
- cl::desc(
58
- " If the global merge pass is enabled, force enable global merging of "
59
- " external globals (overriding any logic that might disable it)" ));
60
-
61
54
static cl::opt<bool >
62
55
EnableMachineCombiner (" riscv-enable-machine-combiner" ,
63
56
cl::desc (" Enable the machine combiner pass" ),
@@ -494,8 +487,7 @@ bool RISCVPassConfig::addPreISel() {
494
487
// Investigating and addressing both items are TODO.
495
488
addPass (createGlobalMergePass (TM, /* MaxOffset */ 2047 ,
496
489
/* OnlyOptimizeForSize */ false ,
497
- /* MergeExternalByDefault */
498
- ForceEnableGlobalMergeExternalGlobals));
490
+ /* MergeExternalByDefault */ true ));
499
491
}
500
492
501
493
return false ;
Original file line number Diff line number Diff line change 1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
- ; RUN: llc -mtriple=riscv64 -riscv-force-enable-global-merge-external-globals \
3
- ; RUN: -verify-machineinstrs < %s | FileCheck %s -check-prefix=SMALL-DATA
4
- ; RUN: llc -mtriple=riscv64 -global-merge-min-data-size=0 \
5
- ; RUN: -riscv-force-enable-global-merge-external-globals -verify-machineinstrs < %s \
2
+ ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
3
+ ; RUN: | FileCheck %s -check-prefix=SMALL-DATA
4
+ ; RUN: llc -mtriple=riscv64 -global-merge-min-data-size=0 -verify-machineinstrs < %s \
6
5
; RUN: | FileCheck %s -check-prefix=MINSIZE
7
6
8
7
@ig1 = internal global i32 0 , align 4
Original file line number Diff line number Diff line change 1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
- ; RUN: llc -mtriple=riscv32 -riscv-force-enable-global-merge-external-globals \
3
- ; RUN: -verify-machineinstrs < %s | FileCheck %s -check-prefix=SMALL-DATA
4
- ; RUN: llc -mtriple=riscv64 -global-merge-min-data-size=5 \
5
- ; RUN: -riscv-force-enable-global-merge-external-globals -verify-machineinstrs < %s \
2
+ ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
3
+ ; RUN: | FileCheck %s -check-prefix=SMALL-DATA
4
+ ; RUN: llc -mtriple=riscv64 -global-merge-min-data-size=5 -verify-machineinstrs < %s \
6
5
; RUN: | FileCheck %s -check-prefix=MINSIZE
7
6
8
7
@ig1 = internal global i32 0 , align 4
Original file line number Diff line number Diff line change 1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
- ; RUN: llc -mtriple=riscv32 -riscv-force-enable-global-merge-external-globals \
2
+ ; RUN: llc -mtriple=riscv32 \
3
3
; RUN: -verify-machineinstrs < %s | FileCheck %s -check-prefix=RV32
4
4
; RUN: llc -mtriple=riscv32 -global-merge-min-data-size=5 \
5
- ; RUN: -riscv-force-enable-global-merge-external-globals - verify-machineinstrs < %s | FileCheck %s -check-prefix=RV32-MINSIZE
5
+ ; RUN: -verify-machineinstrs < %s | FileCheck %s -check-prefix=RV32-MINSIZE
6
6
7
7
@ig1 = internal global i32 0 , align 4
8
8
@ig2 = internal global i32 0 , align 4
Original file line number Diff line number Diff line change 1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
2
; RUN: sed 's/ArrSize/100/g' %s | llc -mtriple=riscv32 \
3
- ; RUN: -riscv-force-enable-global-merge-external-globals - verify-machineinstrs | FileCheck %s
3
+ ; RUN: -verify-machineinstrs | FileCheck %s
4
4
; RUN: sed 's/ArrSize/100/g' %s | llc -mtriple=riscv64 \
5
- ; RUN: -riscv-force-enable-global-merge-external-globals - verify-machineinstrs | FileCheck %s
5
+ ; RUN: -verify-machineinstrs | FileCheck %s
6
6
; RUN: sed 's/ArrSize/101/g' %s | llc -mtriple=riscv32 \
7
- ; RUN: -riscv-force-enable-global-merge-external-globals - verify-machineinstrs | FileCheck %s -check-prefix=CHECK-TOOBIG
7
+ ; RUN: -verify-machineinstrs | FileCheck %s -check-prefix=CHECK-TOOBIG
8
8
; RUN: sed 's/ArrSize/101/g' %s | llc -mtriple=riscv64 \
9
- ; RUN: -riscv-force-enable-global-merge-external-globals - verify-machineinstrs | FileCheck %s -check-prefix=CHECK-TOOBIG
9
+ ; RUN: -verify-machineinstrs | FileCheck %s -check-prefix=CHECK-TOOBIG
10
10
11
11
; This test demonstrates that the MaxOffset is set correctly for RISC-V by
12
12
; constructing an input that is at the limit and comparing.
Original file line number Diff line number Diff line change 1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
- ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s | FileCheck %s
3
- ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s | FileCheck %s
4
- ; RUN: llc -mtriple=riscv32 \
5
- ; RUN: -riscv-force-enable-global-merge-external-globals -verify-machineinstrs < %s \
2
+ ; RUN: llc -mtriple=riscv32 -global-merge-on-external=false \
3
+ ; RUN: -verify-machineinstrs < %s | FileCheck %s
4
+ ; RUN: llc -mtriple=riscv64 -global-merge-on-external=false \
5
+ ; RUN: -verify-machineinstrs < %s | FileCheck %s
6
+ ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
6
7
; RUN: | FileCheck -check-prefix=CHECK-WEXTERN %s
7
- ; RUN: llc -mtriple=riscv64 \
8
- ; RUN: -riscv-force-enable-global-merge-external-globals -verify-machineinstrs < %s \
8
+ ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
9
9
; RUN: | FileCheck -check-prefix=CHECK-WEXTERN %s
10
10
11
11
@ig1 = internal global i32 0 , align 4
You can’t perform that action at this time.
0 commit comments