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>
5151 EnableGlobalMerge (" riscv-enable-global-merge" , cl::Hidden,
5252 cl::desc (" Enable the global merge pass" ));
5353
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-
6154static cl::opt<bool >
6255 EnableMachineCombiner (" riscv-enable-machine-combiner" ,
6356 cl::desc (" Enable the machine combiner pass" ),
@@ -494,8 +487,7 @@ bool RISCVPassConfig::addPreISel() {
494487 // Investigating and addressing both items are TODO.
495488 addPass (createGlobalMergePass (TM, /* MaxOffset */ 2047 ,
496489 /* OnlyOptimizeForSize */ false ,
497- /* MergeExternalByDefault */
498- ForceEnableGlobalMergeExternalGlobals));
490+ /* MergeExternalByDefault */ true ));
499491 }
500492
501493 return false ;
Original file line number Diff line number Diff line change 11; 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 \
65; RUN: | FileCheck %s -check-prefix=MINSIZE
76
87@ig1 = internal global i32 0 , align 4
Original file line number Diff line number Diff line change 11; 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 \
65; RUN: | FileCheck %s -check-prefix=MINSIZE
76
87@ig1 = internal global i32 0 , align 4
Original file line number Diff line number Diff line change 11; 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 \
33; RUN: -verify-machineinstrs < %s | FileCheck %s -check-prefix=RV32
44; 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
66
77@ig1 = internal global i32 0 , align 4
88@ig2 = internal global i32 0 , align 4
Original file line number Diff line number Diff line change 11; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22; 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
44; 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
66; 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
88; 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
1010
1111; This test demonstrates that the MaxOffset is set correctly for RISC-V by
1212; constructing an input that is at the limit and comparing.
Original file line number Diff line number Diff line change 11; 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 \
67; 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 \
99; RUN: | FileCheck -check-prefix=CHECK-WEXTERN %s
1010
1111@ig1 = internal global i32 0 , align 4
You can’t perform that action at this time.
0 commit comments