This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Option overriding in the offloading code path (was: [nvptx] -freorder-blocks-and-partition, -freorder-functions)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: Bernd Schmidt <bernds at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 Feb 2015 18:00:54 +0100
- Subject: Re: Option overriding in the offloading code path (was: [nvptx] -freorder-blocks-and-partition, -freorder-functions)
- Authentication-results: sourceware.org; auth=none
- References: <5454CDF1 dot 3070307 at codesourcery dot com> <87fvacld85 dot fsf at kepler dot schwinge dot homeip dot net> <87a90klcyb dot fsf at kepler dot schwinge dot homeip dot net> <87mw429tfn dot fsf at kepler dot schwinge dot homeip dot net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Feb 25, 2015 at 11:28:12AM +0100, Thomas Schwinge wrote:
> Am I on the right track with my assumption that it is correct that
> nvptx.c:nvptx_option_override is not invoked in the offloading code path,
> so we'd need a new target hook (?) to consolidate/override the options in
> this scenario?
>
>
> Using this to forcefully disable -fvar-tracking (as done in
> nvptx_option_override), should then allow me to drop the following
> beautiful specimen of a patch (which I didn't commit anywhere, so far):
Supposedly you could just disable var-tracking for
targetm.no_register_allocation case, or change that assert to
allow pseudos for targetm.no_register_allocation?
Anyway, if var-tracking is never useful for NVPTX, if you want to override
it early, flag_var_tracking* options are Optimization options, thus you'd
need a target hook similar to the one I've added today, but instead of
TARGET_OPTION_NODE do something similar for OPTIMIZATION_NODE streaming.
Jakub