This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree is the default node to recalculate optab availability
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Fri, 26 Feb 2016 15:51:31 +0000
- Subject: Re: [PATCH][AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree is the default node to recalculate optab availability
- Authentication-results: sourceware.org; auth=none
- References: <56CEDFB5 dot 8050707 at foss dot arm dot com>
On Thu, Feb 25, 2016 at 11:04:21AM +0000, Kyrill Tkachov wrote:
> Hi all,
>
> Seems like aarch64 is suffering from something similar to PR 69245 as well.
> If a target pragma sets the target state to the same as the
> target_option_default_node the node is just a pointer to
> target_option_default_node rather than a distinct identical node. So we must
> still restore the target globals even when setting to
> target_option_default_node in order to force the midend to recompute the
> availability of various optabs.
>
> If we don't do it, we can get in a problem like in the testcase where the
> isa_flags are all set correctly, but the optab HAVE_* predicates have not
> been recomputed.
>
> There is also a related issue present when popping/resetting target pragmas
> for which I'll send out a patch separately.
>
> Bootstrapped and tested on aarch64.
>
> Ok for trunk?
OK.
Thanks,
James
> Thanks,
> Kyrill
>
>
> 2016-02-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> PR target/69245
> * config/aarch64/aarch64.c (aarch64_set_current_function): Save/restore
> target globals when switching to target_option_default_node.
>
> 2016-02-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> PR target/69245
> * gcc.target/aarch64/pr69245_1.c: New test.