]> git.ipfire.org Git - thirdparty/gcc.git/commit
Don't pass vector params through to offload targets
authorAndrew Stubbs <ams@baylibre.com>
Thu, 24 Jul 2025 12:58:31 +0000 (12:58 +0000)
committerAndrew Stubbs <ams@baylibre.com>
Wed, 30 Jul 2025 12:47:32 +0000 (12:47 +0000)
commitb31fa1ce19542e14bea10f46240f39cb37277b80
tree114dd9a22adea7df896395c3b4341a86b7209b5f
parenta0d2de441ea0898e508c36567fbb77f161afa3c8
Don't pass vector params through to offload targets

The optimization options are deliberately passed through to the LTO compiler,
but when the same mechanism is reused for offloading it ends up forcing the
host compiler settings onto the device compiler.  Maybe this should be removed
completely, but this patch just fixes a few of them.  In particular,
param_vect_partial_vector_usage is disabled by x86 and this really hurts amdgcn.

I also fixed an ambiguous else warning in the generated file by adding braces.

gcc/ChangeLog:

* config/gcn/gcn.cc (gcn_option_override): Add note to set default for
param_vect_partial_vector_usage to "1".
* optc-save-gen.awk: Don't pass through options marked "NoOffload".
* params.opt (-param=vect-epilogues-nomask): Add NoOffload.
(-param=vect-partial-vector-usage): Likewise.
(-param=vect-inner-loop-cost-factor): Likewise.
gcc/config/gcn/gcn.cc
gcc/optc-save-gen.awk
gcc/params.opt