public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>,
	Richard Biener <richard.guenther@gmail.com>
Cc: "Jose E. Marchesi" <jose.marchesi@oracle.com>,
	gcc-patches@gcc.gnu.org, david.faust@oracle.com
Subject: Re: [PATCH] expr.cc: avoid unexpected side effects in expand_expr_divmod optimization
Date: Mon, 9 Jan 2023 07:01:23 -0700	[thread overview]
Message-ID: <fd4406f3-8202-6e5b-361a-51e94bcb2add@gmail.com> (raw)
In-Reply-To: <Y7vlHcC18yggYNwj@tucnak>



On 1/9/23 02:57, Jakub Jelinek via Gcc-patches wrote:
> On Mon, Jan 09, 2023 at 09:05:26AM +0100, Richard Biener wrote:
>> On Wed, Jan 4, 2023 at 9:54 AM Jose E. Marchesi via Gcc-patches
>> <gcc-patches@gcc.gnu.org> wrote:
>>>
>>>
>>> ping.
>>> Would this be a good approach for fixing the issue?
>>
>> adding the is_libcall bit enlarges rtx_def by 8 bytes - there's no room for more
>> bits here.
> 
> That is obviously not the way to go, sure.
> 
>> I really wonder how other targets avoid the issue you are pointing out?
>> Do their assemblers prune unused (extern) .global?
> 
> I think no target solves this, if they see an extern call during expansion
> and emit some directive for those, they emit the global or whatever directive
> which remains there.
> 
> If all bits for CALL_INSN are taken, can't we add a flag on the CALL
> rtx inside of the CALL_INSN pattern?  Or a flag on the SYMBOL_REF inside of
> it (libcalls are always direct calls, aren't they) or SYMBOL_REF_FLAGS ?
You might look at 32bit PA SOM.  It was always a bit odd in this respect.

You had to import every external symbol explicitly and it disliked 
importing something that wasn't used.  I recall some special handling 
for libcalls as well.

Jeff

  parent reply	other threads:[~2023-01-09 14:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 10:59 Jose E. Marchesi
2022-12-08 12:20 ` Jakub Jelinek
2022-12-08 13:02   ` Jose E. Marchesi
2022-12-08 13:19     ` Jakub Jelinek
2022-12-08 22:40       ` Jose E. Marchesi
2023-01-04  8:58         ` Jose E. Marchesi
2023-01-09  8:05           ` Richard Biener
2023-01-09  9:57             ` Jakub Jelinek
2023-01-09 13:04               ` Richard Biener
2023-01-09 13:25                 ` Jakub Jelinek
2023-01-09 14:01               ` Jeff Law [this message]
2022-12-08 13:42 ` Richard Biener
2022-12-08 16:03   ` Jose E. Marchesi
2023-01-30 18:45 ` Andrew Pinski
2023-01-30 18:55   ` Jose E. Marchesi

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=fd4406f3-8202-6e5b-361a-51e94bcb2add@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=david.faust@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jose.marchesi@oracle.com \
    --cc=richard.guenther@gmail.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).