https://gcc.gnu.org/g:9c24b4d7df324cd2041ad16c810d6b4ca9dab0eb

commit r16-7276-g9c24b4d7df324cd2041ad16c810d6b4ca9dab0eb
Author: Prachi Godbole <[email protected]>
Date:   Tue Feb 3 23:23:10 2026 -0800

    ipa-reorder-for-locality - Adjust bootstrap-lto-locality and param to 
reduce compile time
    
    This patch turns off -fipa-reorder-for-locality for -fprofile-generate 
because
    it's not required and contributes to the bloated time taken by bootstrap.  
It
    also reduces the default partition size by half; the increased number of
    partitions speeds up LTRANS phase.
    
    Bootstrapped and tested on aarch64-none-linux-gnu. OK for mainline?
    
    Signed-off-by: Prachi Godbole <[email protected]>
    
    config/ChangeLog:
    
            * bootstrap-lto-locality.mk (STAGEprofile_CFLAGS): Remove
            -fipa-reorder-for-locality.
            (STAGEtrain_CFLAGS): Ditto.
    
    gcc/ChangeLog:
    
            * params.opt: Change default param value.

Diff:
---
 config/bootstrap-lto-locality.mk | 4 ++--
 gcc/params.opt                   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config/bootstrap-lto-locality.mk b/config/bootstrap-lto-locality.mk
index b31565c4c52c..6d359b70058a 100644
--- a/config/bootstrap-lto-locality.mk
+++ b/config/bootstrap-lto-locality.mk
@@ -2,8 +2,8 @@
 
 STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 -fipa-reorder-for-locality
 STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 -fipa-reorder-for-locality
-STAGEprofile_CFLAGS += -flto=jobserver -frandom-seed=1 
-fipa-reorder-for-locality
-STAGEtrain_CFLAGS += -flto=jobserver -frandom-seed=1 -fipa-reorder-for-locality
+STAGEprofile_CFLAGS += -flto=jobserver -frandom-seed=1
+STAGEtrain_CFLAGS += -flto=jobserver -frandom-seed=1
 STAGEfeedback_CFLAGS += -flto=jobserver -frandom-seed=1 
-fipa-reorder-for-locality
 
 # assumes the host supports the linker plugin
diff --git a/gcc/params.opt b/gcc/params.opt
index 921d143f517f..5506bc0e4629 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -517,7 +517,7 @@ Common Joined UInteger Var(param_lto_locality_size) 
Init(1000) IntegerRange(1, 6
 Size cut-off for callee including inlined calls to be cloned for a particular 
caller.
 
 -param=lto-max-locality-partition=
-Common Joined UInteger Var(param_max_locality_partition_size) Init(1000000) 
Param
+Common Joined UInteger Var(param_max_locality_partition_size) Init(500000) 
Param
 Maximal size of a locality partition for LTO (in estimated instructions). 
Value of 0 results in default value being used.
 
 Enum

Reply via email to