public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <botcazou@adacore.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Roger Sayle <roger@nextmovesoftware.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Tamar Christina <tnfchris@gcc.gnu.org>
Subject: Re: [PATCH] PR middle-end/105874: Use EXPAND_MEMORY to fix ada bootstrap.
Date: Mon, 13 Jun 2022 13:29:22 +0200	[thread overview]
Message-ID: <2072400.OBFZWjSADL@fomalhaut> (raw)
In-Reply-To: <CAFiYyc2=V8EZyfwKifz9Tfz3GBEikxy1f_X8uBs1niNvRsSBcg@mail.gmail.com>

> +       /* If tem is a VAR_DECL, we need a memory reference.  */
> +       enum expand_modifier tem_modifier = modifier;
> +       if (tem_modifier == EXPAND_SUM)
> +         tem_modifier = EXPAND_NORMAL;
> +       if (TREE_CODE (tem) == VAR_DECL)
> +         tem_modifier = EXPAND_MEMORY;
> 
> that changes EXPAND_WRITE to EXPAND_MEMORY for VAR_DECL
> for example - what's 'modifier' in the problematic case?

My understanding is that it was EXPAND_NORMAL.

> I do not understand how 'VAR_DECL' is special here btw. - it seems to be a
> condition making sure the new optimization doesn't trigger rather than a
> condition that will always require memory?

It may indeed be too big a hammer.

Roger, would it be sufficient to use EXPAND_MEMORY only when must_force_mem 
computed a few lines below if true?

-- 
Eric Botcazou



      reply	other threads:[~2022-06-13 11:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 13:06 Roger Sayle
2022-06-08 14:13 ` Eric Botcazou
2022-06-13 10:42   ` Richard Biener
2022-06-13 11:29     ` Eric Botcazou [this message]

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=2072400.OBFZWjSADL@fomalhaut \
    --to=botcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=roger@nextmovesoftware.com \
    --cc=tnfchris@gcc.gnu.org \
    /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).