public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Greenhalgh <james.greenhalgh@arm.com>
To: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	       Marcus Shawcroft <marcus.shawcroft@arm.com>,
	       Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: Re: [PATCH][AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree is the default node to recalculate optab availability
Date: Fri, 26 Feb 2016 15:51:00 -0000	[thread overview]
Message-ID: <20160226155131.GE40219@arm.com> (raw)
In-Reply-To: <56CEDFB5.8050707@foss.arm.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.


  reply	other threads:[~2016-02-26 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 11:04 Kyrill Tkachov
2016-02-26 15:51 ` James Greenhalgh [this message]
2016-02-29 14:10   ` Christophe Lyon
2016-02-29 14:28     ` Kyrill Tkachov
2016-02-29 14:33       ` Christophe Lyon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160226155131.GE40219@arm.com \
    --to=james.greenhalgh@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kyrylo.tkachov@foss.arm.com \
    --cc=marcus.shawcroft@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).