From: Prachi Godbole Date: Wed, 4 Feb 2026 07:23:10 +0000 (-0800) Subject: ipa-reorder-for-locality - Adjust bootstrap-lto-locality and param to reduce compile... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c24b4d7df324cd2041ad16c810d6b4ca9dab0eb;p=thirdparty%2Fgcc.git 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 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 --git a/config/bootstrap-lto-locality.mk b/config/bootstrap-lto-locality.mk index b31565c4c52..6d359b70058 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 921d143f517..5506bc0e462 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