]> git.ipfire.org Git - thirdparty/gcc.git/commit
opts.cc Simplify handling of explicit -flto-partition= and -fipa-reorder-for-locality
authorKyrylo Tkachov <ktkachov@nvidia.com>
Thu, 24 Apr 2025 07:34:09 +0000 (00:34 -0700)
committerKyrylo Tkachov <ktkachov@nvidia.com>
Thu, 24 Apr 2025 12:04:14 +0000 (14:04 +0200)
commit340a9f871f02a23a4480a7b5f4eacadf689089e5
tree9a109d5bd71b5d7c9c7cff1736148852450c5f70
parent682550f23c8c75c7897724dad57567814e8dff9b
opts.cc Simplify handling of explicit -flto-partition= and -fipa-reorder-for-locality

The handling of an explicit -flto-partition= and -fipa-reorder-for-locality
should be simpler.  No need to have a new default option.  We can use opts_set
to check if -flto-partition is explicitly set and use that information in the
error handling.
Remove -flto-partition=default and update accordingly.

Bootstrapped and tested on aarch64-none-linux-gnu.

Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
gcc/

* common.opt (LTO_PARTITION_DEFAULT): Delete.
(flto-partition=): Change default back to balanced.
* flag-types.h (lto_partition_model): Remove LTO_PARTITION_DEFAULT.
* opts.cc (validate_ipa_reorder_locality_lto_partition):
Check opts_set->x_flag_lto_partition instead of LTO_PARTITION_DEFAULT.
(finish_options): Remove handling of LTO_PARTITION_DEFAULT.

gcc/testsuite/

* gcc.dg/completion-2.c: Remove check for default.

(cherry picked from commit 040f94d1f63c3607a2f3faf5c329c3b2b6bf7d1e)
gcc/common.opt
gcc/flag-types.h
gcc/opts.cc
gcc/testsuite/gcc.dg/completion-2.c