public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Evandro Menezes <ebahapo@icloud.com>
To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
Cc: Richard Sandiford <Richard.Sandiford@arm.com>,
	Evandro Menezes via Gcc-patches <gcc-patches@gcc.gnu.org>,
	"evandro+gcc@gcc.gnu.org" <evandro+gcc@gcc.gnu.org>,
	Tamar Christina <Tamar.Christina@arm.com>,
	Ramana Radhakrishnan <ramana.gcc@googlemail.com>
Subject: Re: [PATCH] aarch64: Add SVE instruction types
Date: Tue, 12 Sep 2023 19:54:09 -0500	[thread overview]
Message-ID: <2A544AF3-7F97-4606-9D60-2FC625A9DEEB@icloud.com> (raw)
In-Reply-To: <PAXPR08MB6926C235B6C29D360EA4BE9E93799@PAXPR08MB6926.eurprd08.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 5381 bytes --]

Hi, Kyrill.

I wonder if the regression that you noticed was the same that I did.  Overall, thus far, there’s no significant regression that I can say is due to scheduling.  However, there is one benchmark, 507.cactuBSSN_r/607.cactuBSSN_s in SPEC2017, that regressed by more than 10%.  Upon closer examination, it seems that the change in the live ranges led to heavy spilling and to doubling of the stack size.  The spilling looks rather capricious though, as there seem to be enough free registers available.  

Is this similar to what you observed as well?  I tried to adjust the priority of memory ops through, TARGET_SCHED_ADJUST_PRIORITY, but it was innefective.  I’m a bit at a loss what’s likely going on with the RA at this point.  Any pointers?

Thank you,

-- 
Evandro Menezes



> Em 16 de mai. de 2023, à(s) 03:36, Kyrylo Tkachov <Kyrylo.Tkachov@arm.com> escreveu:
> 
> Hi Evandro,
>  
> I created a new attribute so I didn’t have to extend the “type” attribute that lives in config/arm/types.md. As that attribute and file lives in the arm backend but SVE is AArch64-only I didn’t want to add logic to the arm backend as it’s not truly shared.
> The granularity has been somewhat subjective. I had looked at the Software Optimisation guides for various SVE and SVE2-capable cores from Arm on developer.arm.com and tried to glean commonalities between different instruction groups.
> I did try writing a model for Neoverse V1 using that classification but I couldn’t spend much time on it and the resulting model didn’t give me much improvements and gave some regressions instead.
> I think that was more down to my rushed model rather than anything else though.
>  
> Thanks,
> Kyrill
>  
> From: Evandro Menezes <ebahapo@icloud.com> 
> Sent: Monday, May 15, 2023 9:13 PM
> To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
> Cc: Richard Sandiford <Richard.Sandiford@arm.com>; Evandro Menezes via Gcc-patches <gcc-patches@gcc.gnu.org>; evandro+gcc@gcc.gnu.org; Tamar Christina <Tamar.Christina@arm.com>
> Subject: Re: [PATCH] aarch64: Add SVE instruction types
>  
> Hi, Kyrill.
>  
> I wasn’t aware of your previous patch.  Could you clarify why you considered creating an SVE specific type attribute instead of reusing the common one?  I really liked the iterators that you created; I’d like to use them.
>  
> Do you have specific examples which you might want to mention with regards to granularity?
>  
> Yes, my intent for this patch is to enable modeling the SVE instructions on N1.  The patch that implements it brings up some performance improvements, but it’s mostly flat, as expected.
>  
> Thank you,
> 
> -- 
> Evandro Menezes
>  
>  
> 
> 
> Em 15 de mai. de 2023, à(s) 04:49, Kyrylo Tkachov <Kyrylo.Tkachov@arm.com <mailto:Kyrylo.Tkachov@arm.com>> escreveu:
>  
> 
> 
> 
> -----Original Message-----
> From: Richard Sandiford <richard.sandiford@arm.com <mailto:richard.sandiford@arm.com>>
> Sent: Monday, May 15, 2023 10:01 AM
> To: Evandro Menezes via Gcc-patches <gcc-patches@gcc.gnu.org <mailto:gcc-patches@gcc.gnu.org>>
> Cc: evandro+gcc@gcc.gnu.org <mailto:evandro+gcc@gcc.gnu.org>; Evandro Menezes <ebahapo@icloud.com <mailto:ebahapo@icloud.com>>;
> Kyrylo Tkachov <Kyrylo.Tkachov@arm.com <mailto:Kyrylo.Tkachov@arm.com>>; Tamar Christina
> <Tamar.Christina@arm.com <mailto:Tamar.Christina@arm.com>>
> Subject: Re: [PATCH] aarch64: Add SVE instruction types
> 
> Evandro Menezes via Gcc-patches <gcc-patches@gcc.gnu.org <mailto:gcc-patches@gcc.gnu.org>> writes:
> 
> This patch adds the attribute `type` to most SVE1 instructions, as in the
> other
> 
> instructions.
> 
> Thanks for doing this.
> 
> Could you say what criteria you used for picking the granularity?  Other
> maintainers might disagree, but personally I'd prefer to distinguish two
> instructions only if:
> 
> (a) a scheduling description really needs to distinguish them or
> (b) grouping them together would be very artificial (because they're
>    logically unrelated)
> 
> It's always possible to split types later if new scheduling descriptions
> require it.  Because of that, I don't think we should try to predict ahead
> of time what future scheduling descriptions will need.
> 
> Of course, this depends on having results that show that scheduling
> makes a significant difference on an SVE core.  I think one of the
> problems here is that, when a different scheduling model changes the
> performance of a particular test, it's difficult to tell whether
> the gain/loss is caused by the model being more/less accurate than
> the previous one, or if it's due to important "secondary" effects
> on register live ranges.  Instinctively, I'd have expected these
> secondary effects to dominate on OoO cores.
> 
> I agree with Richard on these points. The key here is getting the granularity right without having too maintain too many types that aren't useful in the models.
> FWIW I had posted https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607101.html in November. It adds annotations to SVE2 patterns as well as for base SVE.
> Feel free to reuse it if you'd like.
> I see you had posted a Neoverse V1 scheduling model. Does that give an improvement on SVE code when combined with the scheduling attributes somehow?
> Thanks,
> Kyrill
>  


  parent reply	other threads:[~2023-09-13  0:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 23:08 Evandro Menezes
2023-05-15  9:00 ` Richard Sandiford
2023-05-15  9:49   ` Kyrylo Tkachov
2023-05-15 20:13     ` Evandro Menezes
2023-05-16  8:36       ` Kyrylo Tkachov
2023-05-16 20:12         ` Evandro Menezes
2023-09-13  0:54         ` Evandro Menezes [this message]
2023-05-15 19:59   ` Evandro Menezes

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=2A544AF3-7F97-4606-9D60-2FC625A9DEEB@icloud.com \
    --to=ebahapo@icloud.com \
    --cc=Kyrylo.Tkachov@arm.com \
    --cc=Richard.Sandiford@arm.com \
    --cc=Tamar.Christina@arm.com \
    --cc=evandro+gcc@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ramana.gcc@googlemail.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).