public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Jeff Law <jeffreyalaw@gmail.com>,
	Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org>,
	Aldy Hernandez <aldyh@redhat.com>
Cc: Martin Sebor <msebor@redhat.com>, GCC patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Try to resolve paths in threader without looking further back.
Date: Sun, 24 Oct 2021 20:21:03 +0200	[thread overview]
Message-ID: <7F9F4D50-AF26-46B9-8CB8-EA83F1B6501F@gmail.com> (raw)
In-Reply-To: <4c5533a3-7b11-a387-f519-9d90a0638c97@gmail.com>

On October 24, 2021 6:57:05 PM GMT+02:00, Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
>
>
>On 10/21/2021 9:53 PM, Aldy Hernandez wrote:
>>
>>
>>     >
>>     > Phew, I think we're finally converging on a useful set of
>>     threading tests :).
>>     >
>>     > OK for trunk?
>>     Mostly, I just worry about losing the key test for the FSM
>>     optimization.
>>
>>
>> With the provided test, the forward threaders can't thread through the 
>> backedge and into the switch. Disabling the other threaders was just a 
>> precaution. I just wanted to make sure it happened late because of the 
>> loop restrictions we have in place. I could enable the forward 
>> threaders to prove they can't get it.
>Right.  There was a time when the forward threaders handled the 
>backedge, but it's much better handled by the backwards threader.
>
>> I could add more cases and check that we have N or more threads 
>> through the back edges. .and if it makes you feel safer, we could even 
>> convert the test to gimple and test the specific thread sequence. It's 
>> just that the gimple FE test is bound to get large and difficult to 
>> decipher if I start adding many switch cases.
>I would love if we could turn the testcase into a gimple based test.  I 
>just shudder at the thought of trying to pull that together.  And yes, 
>it's awful hard to decipher, both in terms of test behavior and in terms 
>of what the key jump threads are.
>
>>
>> I'm just trying to avoid a huge test with 40 potential threads where 
>> no one really knows how many we should get....as every threading pass 
>> opens up possibilities for other passes.
>Understood.  To some degree it's inherent in the problem.  The smarter 
>our threaders get the more likely they are to discover new 
>opportunities, so there's clearly a maintenance burden to these tests 
>over time.  It's made worse by the interactions with BRANCH_COST as well 
>as the heuristics for switch conversion.
>
>Gimple based tests would significantly help the the latter issues, but I 
>don't know how to tackle the problem of exposing more jump threads as 
>our threaders get better.

Well, you'd feed the specific GIMPLE to a single threading pass and check its dump file. With GIMPLE based tests you can nearly do unit testing... 

>>
>> Ughhhh....we could put the test back, check for some random large 
>> number, and come up with a more satisfactory test later? ;-)

Maybe we can dump the source location of conditions we thread through when dumping the threading pass. 

>I thought our "counting" based tests could only check equality (ie, 
>expect to see this string precisely N times).  Though if we could check 
>that # threads realized was > some low water mark, that'd probably be 
>better than what we've got right now.
>
>
>jeff


  parent reply	other threads:[~2021-10-24 18:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 10:28 Aldy Hernandez
2021-10-20 14:35 ` Martin Sebor
2021-10-20 15:15   ` Aldy Hernandez
2021-10-20 20:01     ` Jeff Law
2021-10-21  7:17       ` Aldy Hernandez
2021-10-21 14:50         ` Martin Sebor
2021-10-22 11:22           ` Aldy Hernandez
2021-10-22 14:27             ` Martin Sebor
2021-10-22 15:18               ` Aldy Hernandez
2021-10-22 15:59                 ` Martin Sebor
2021-10-23  8:31                   ` Aldy Hernandez
2021-10-21 17:59         ` Jeff Law
2021-10-21  7:22       ` Richard Biener
2021-10-20 20:19 ` Jeff Law
2021-10-21 10:15   ` Aldy Hernandez
2021-10-22  3:34     ` Jeff Law
2021-10-22  3:53       ` Aldy Hernandez
2021-10-24 16:57         ` Jeff Law
2021-10-24 17:55           ` Bernhard Reutner-Fischer
2021-10-24 18:21           ` Richard Biener [this message]
2021-10-24 18:25           ` Aldy Hernandez
2021-10-25  6:47             ` Aldy Hernandez
2021-10-25 18:42             ` Jeff Law
2021-10-25 18:49               ` Aldy Hernandez
2021-10-25 18:58                 ` Jeff Law
2021-10-25 16:58 ` Andrew MacLeod
2021-10-25 17:01   ` Aldy Hernandez
2021-10-25 17:02   ` 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=7F9F4D50-AF26-46B9-8CB8-EA83F1B6501F@gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=msebor@redhat.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).