]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ipa-reorder-for-locality - Adjust bootstrap-lto-locality and param to reduce compile...
authorPrachi Godbole <pgodbole@nvidia.com>
Wed, 4 Feb 2026 07:23:10 +0000 (23:23 -0800)
committerKyrylo Tkachov <ktkachov@nvidia.com>
Wed, 4 Feb 2026 09:09:27 +0000 (10:09 +0100)
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 <pgodbole@nvidia.com>
config/ChangeLog:

* bootstrap-lto-locality.mk (STAGEprofile_CFLAGS): Remove
-fipa-reorder-for-locality.
(STAGEtrain_CFLAGS): Ditto.

gcc/ChangeLog:

* params.opt: Change default param value.

config/bootstrap-lto-locality.mk
gcc/params.opt

index b31565c4c52c70e142d3ddec47ae0f097ffae229..6d359b70058a6b7fb1484e68bffcd05358ce4144 100644 (file)
@@ -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
index 921d143f517fa5da2168bb109223da68640118f4..5506bc0e4629bf4a89f24f29fbb9d69c2d8759df 100644 (file)
@@ -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