From: Jeff Law <law@redhat.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix PR63184
Date: Fri, 07 Dec 2018 15:26:00 -0000 [thread overview]
Message-ID: <247d03c8-7e8a-9bb2-f233-924d84a33f85@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.20.1812071126230.1827@zhemvz.fhfr.qr>
On 12/7/18 3:55 AM, Richard Biener wrote:
> On Fri, 7 Dec 2018, Richard Biener wrote:
>
>>
>> The following fixes PR63184 by using tree-affine to resolve pointer
>> comparisons. Instead of trying to stick this into a match.pd pattern
>> the following does this in the more constrained forwprop environment.
>>
>> I've only implemented the cases where the comparison resolves to a
>> compile-time value, not the case where for example &a[i] < &a[j]
>> could be simplified to i < j. I'm not sure I can trust the
>> tree-affine machinery enough here to do that.
>>
>> Both testcases require some CSE to happen thus the first forwprop
>> pass doesn't catch it.
>>
>> Bootstrap & regtest running on x86_64-unknown-linux-gnu.
>>
>> I'll collect some statistics from bootstrap.
>
> Somewhat depressing. There's a single instance in
> libiberty/rust-demangle.c that gets resolved (a ordered compare).
> This instance triggers 4 times during a c,c++ bootstrap compared
> to 258098 affine expansion combinations tried.
>
> It doesn't trigger in tramp3d at all (just to try a C++ code base).
>
> I suspect the cases in PR63184 are arcane enough and usually we
> have simpler addresses that are resolved with the existing
> patterns.
>
> I'll attach the patch to the PR and leave it alone.
Seems reasonable to me as well. It's originally your BZ and somewhere
in it I think you indicated you didn't think it was terribly important.
I'd suggest pushing it out to P4. But I know you don't like that, so I
won't actually do it :-)
Jeff
prev parent reply other threads:[~2018-12-07 15:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-07 10:03 Richard Biener
2018-12-07 10:55 ` Richard Biener
2018-12-07 15:26 ` Jeff Law [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=247d03c8-7e8a-9bb2-f233-924d84a33f85@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).