This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: var-tracking vs. pseudo registers (was: Option overriding in the offloading code path)
- 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: Thu, 26 Feb 2015 11:46:00 +0100
- Subject: Re: var-tracking vs. pseudo registers (was: Option overriding in the offloading code path)
- 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> <20150225170054 dot GV1746 at tucnak dot redhat dot com> <87vbipge85 dot fsf at schwinge dot name>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Feb 26, 2015 at 11:27:06AM +0100, Thomas Schwinge wrote:
> Is this not the right way to skip it, or, Bernd, is this because we're
> not yet handling some debug stuff in nvptx? (I tested that
> <http://news.gmane.org/find-root.php?message_id=%3C5466473A.1090809%40codesourcery.com%3E>
> does not help with that.) The following does make it work (that is,
> resolve the ICEs), but that feels a bit too much ;-) of a hack:
>
> --- gcc/var-tracking.c
> +++ gcc/var-tracking.c
> @@ -10305,7 +10322,8 @@ variable_tracking_main_1 (void)
> {
> bool success;
>
> - if (flag_var_tracking_assignments < 0)
> + if (flag_var_tracking_assignments < 0
> + || targetm.no_register_allocation)
> {
> delete_debug_insns ();
> return 0;
No, IMHO that is the right fix, not a hack. But of course would deserve
a comment. Plus of course you can also just override
flag_var_tracking_assignments in the nvptx override option hook, and
perhaps in tree-streamer-in.c clear flag_var_tracking_assignments in the
OPTIMIZATION_NODE too (or just add a hook for that, as I said before).
Jakub