From: Aldy Hernandez <aldyh@redhat.com>
To: Jeff Law <jeffreyalaw@gmail.com>,
Richard Biener <richard.guenther@gmail.com>
Cc: Michael Matz <matz@suse.de>, GCC Mailing List <gcc@gcc.gnu.org>,
Andrew MacLeod <amacleod@redhat.com>
Subject: Re: More aggressive threading causing loop-interchange-9.c regression
Date: Fri, 10 Sep 2021 18:11:37 +0200 [thread overview]
Message-ID: <dd9e0fca-857f-779e-a754-65ae1502844a@redhat.com> (raw)
In-Reply-To: <1e903c39-a2ad-f8e3-862e-af48da9c5f2c@gmail.com>
On 9/10/21 5:51 PM, Jeff Law wrote:
>
>
> On 9/9/2021 4:15 AM, Richard Biener wrote:
>>
>>> b) Even though we can seemingly fold everything DOM/threader does, in
>>> order to replace it with a backward threader instance we'd have to merge
>>> the cost/profitability code scattered throughout the forward threader,
>>> as well as the EDGE_FSM* / EDGE_COPY* business.
>>>
>>> c) DOM changes the IL as it goes. Though we could conceivably divorce
>>> do the threading after DOM is done.
>> Yeah, it does not actually process/simplify the blocks copied by
>> threading.
>> In fact I think it only registers jump threading opportunities during
>> the DOM
>> walk and commits them only later. But it of course uses its avail /
>> copies
>> stack to find them - that part you cannot easily divorce.
> Well, divorcing from using the context sensitive avail/copies is part of
> what Aldy & Andrew have been working on. All indications I've seen are
> they're on track to be able to do that.
>
> And yes, it only registers the threads and waits until after DOM is done
> to transform the CFG. That in and of itself introduces all kinds of
> complexity. If we can get to the point where we don't need the context
> sensitive avail/copies, then we've got a real shot at untangling DOM and
> threading which would be a huge maintainability win in my mind.
>
>>
>> DOM is also yet another value-numbering framework - one could think
>> of stripping it down from that side, keeping the threading bits only
>> (but you'd still have the avail / copies bits).
> Yes. I think you and I touched on this a while back. At a high level
> I'd prefer to have FRE rather than DOM doing the bulk of the redundant
> expression elimination. The big blocker there was the tight integration
> of DOM and threading. But if Aldy can untangle that we can then
> evaluate replacing DOM with FRE.
Once ranger does floats, I can't think of anything the forward threader
could get that the backward threader couldn't.
>
>
>>
>> That said, it has one nice property it can leverage due to its incredibly
>> simple memory redundancy handling, in that it usually performs way less
>> alias queries than FRE (even when you run the latter in non-iterative
>> mode).
> DOM as an infrastructure for optimization is probably reaching the end
> of its useful life. FRE has a lot more going for it.
>
>>
>> But the same way DOM can register jump threading opportunities FRE
>> could do as well.
> I'd advise against that and instead look towards a model where no pass
> has integrated jump threading and the only jump threading module we have
> is the backwards threader.
Yes, please. We need to separate jump threading from all passes. One
thing, and do it well.
Aldy
next prev parent reply other threads:[~2021-09-10 16:11 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 11:49 Aldy Hernandez
2021-09-07 14:45 ` Michael Matz
2021-09-08 10:44 ` Aldy Hernandez
2021-09-08 13:13 ` Richard Biener
2021-09-08 13:25 ` Aldy Hernandez
2021-09-08 13:49 ` Richard Biener
2021-09-08 16:19 ` Aldy Hernandez
2021-09-08 16:39 ` Michael Matz
2021-09-08 18:13 ` Michael Matz
2021-09-09 6:57 ` Richard Biener
2021-09-09 7:37 ` Aldy Hernandez
2021-09-09 7:45 ` Richard Biener
2021-09-09 8:36 ` Aldy Hernandez
2021-09-09 8:58 ` Richard Biener
2021-09-09 9:21 ` Aldy Hernandez
2021-09-09 10:15 ` Richard Biener
2021-09-09 11:28 ` Aldy Hernandez
2021-09-10 15:51 ` Jeff Law
2021-09-10 16:11 ` Aldy Hernandez [this message]
2021-09-10 15:43 ` Jeff Law
2021-09-10 16:05 ` Aldy Hernandez
2021-09-10 16:21 ` Jeff Law
2021-09-10 16:38 ` Aldy Hernandez
2021-09-09 16:59 ` Jeff Law
2021-09-09 12:47 ` Michael Matz
2021-09-09 8:14 ` Aldy Hernandez
2021-09-09 8:24 ` Richard Biener
2021-09-09 12:52 ` Michael Matz
2021-09-09 13:37 ` Aldy Hernandez
2021-09-09 14:44 ` Michael Matz
2021-09-09 15:07 ` Aldy Hernandez
2021-09-10 7:04 ` Aldy Hernandez
2021-09-09 16:54 ` Jeff Law
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=dd9e0fca-857f-779e-a754-65ae1502844a@redhat.com \
--to=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=matz@suse.de \
--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).