Re: A problem with one instruction multiple latencies and pipelines

2020-09-14 Thread Segher Boessenkool
On Mon, Sep 14, 2020 at 08:35:44PM +0100, Richard Sandiford wrote: > Segher Boessenkool writes: > >> Although this looks/sounds complicated, the advantage is that everything > >> remains up-to-date. If we instead added a second attribute and only > >> defined it for instructions like *add__,

Re: A problem with one instruction multiple latencies and pipelines

2020-09-14 Thread Richard Sandiford
Segher Boessenkool writes: >> Although this looks/sounds complicated, the advantage is that everything >> remains up-to-date. If we instead added a second attribute and only >> defined it for instructions like *add__, other instructions >> (including config/arm instructions) would still have

Re: A problem with one instruction multiple latencies and pipelines

2020-09-14 Thread Segher Boessenkool
Hi! On Mon, Sep 14, 2020 at 10:55:35AM +0100, Richard Sandiford wrote: > "Qian, Jianhua" writes: > > - If we cannot resolve it, the existing CPUs' descriptions need > > to be changed. This is not what I expected. > > - If we want to add new attribute to resolve this

Re: A problem with one instruction multiple latencies and pipelines

2020-09-14 Thread Richard Sandiford
"Qian, Jianhua" writes: > Hi Richard and Segher > > I don't know if I exactly understood your discussion. > If I misunderstood, please let me know. > > I am trying to test these two cases. > Case 1. keep the TYPE attribute unchanged, add new attributes > It works well as below. >

Re: A problem with one instruction multiple latencies and pipelines

2020-09-14 Thread Richard Earnshaw
On 14/09/2020 03:53, Qian, Jianhua wrote: >> -Original Message- >> From: Richard Earnshaw >> Sent: Friday, September 11, 2020 9:30 PM >> To: Qian, Jianhua/钱 建华 ; gcc@gcc.gnu.org >> Subject: Re: A problem with one instruction multiple latencies and pipelines &

RE: A problem with one instruction multiple latencies and pipelines

2020-09-13 Thread Qian, Jianhua
- If we want to add new attribute to resolve this problem, why not use the Case1 directly? > It is very much not what I am saying. I *am* saying that if people trying to > improve one CPU's modelling have to edit over 20 models for CPUs that they do > not care about, mistakes

RE: A problem with one instruction multiple latencies and pipelines

2020-09-13 Thread Qian, Jianhua
> -Original Message- > From: Richard Earnshaw > Sent: Friday, September 11, 2020 9:30 PM > To: Qian, Jianhua/钱 建华 ; gcc@gcc.gnu.org > Subject: Re: A problem with one instruction multiple latencies and pipelines > > On 07/09/2020 07:08, Qian, Jianhua wrote: > >

Re: A problem with one instruction multiple latencies and pipelines

2020-09-11 Thread Segher Boessenkool
Hi! On Fri, Sep 11, 2020 at 08:44:54AM +0100, Richard Sandiford wrote: > Segher Boessenkool writes: > > Consider cores that do not care about the "subtype" at all: when using > > just "type", all cores have to test for "foo,foo_subtype", while with > > a separate attribute they can just test for

Re: A problem with one instruction multiple latencies and pipelines

2020-09-11 Thread Richard Earnshaw
On 07/09/2020 07:08, Qian, Jianhua wrote: > Hi > > I'm adding a new machine model. I have a problem when writing the > "define_insn_reservation" for instruction scheduling. > How to write the "define_insn_reservation" for one instruction that there are > different latencies and pipelines

Re: A problem with one instruction multiple latencies and pipelines

2020-09-11 Thread Richard Sandiford
Segher Boessenkool writes: > On Thu, Sep 10, 2020 at 11:04:26AM +0100, Richard Sandiford wrote: >> Segher Boessenkool writes: >> > You can also use some other attributes to classify instructions, you >> > don't have to put it all in one "type" attribute. This can of course be >> > done later,

Re: A problem with one instruction multiple latencies and pipelines

2020-09-10 Thread Segher Boessenkool
On Thu, Sep 10, 2020 at 11:04:26AM +0100, Richard Sandiford wrote: > Segher Boessenkool writes: > > You can also use some other attributes to classify instructions, you > > don't have to put it all in one "type" attribute. This can of course be > > done later, at a time when it is clearer what a

Re: A problem with one instruction multiple latencies and pipelines

2020-09-10 Thread Richard Sandiford
Segher Boessenkool writes: > Hi! > > On Mon, Sep 07, 2020 at 09:20:59PM +0100, Richard Sandiford wrote: >> This is just personal opinion, but in general (from the point of view >> of a new port, or a new subport like SVE), I think the best approach >> to handling the "type" attribute is to start

RE: A problem with one instruction multiple latencies and pipelines

2020-09-09 Thread Qian, Jianhua
ol > Sent: Thursday, September 10, 2020 5:23 AM > To: Qian, Jianhua/钱 建华 ; gcc@gcc.gnu.org; > richard.sandif...@arm.com > Subject: Re: A problem with one instruction multiple latencies and pipelines > > Hi! > > On Mon, Sep 07, 2020 at 09:20:59PM +0100, Richard Sandifor

Re: A problem with one instruction multiple latencies and pipelines

2020-09-09 Thread Segher Boessenkool
Hi! On Mon, Sep 07, 2020 at 09:20:59PM +0100, Richard Sandiford wrote: > This is just personal opinion, but in general (from the point of view > of a new port, or a new subport like SVE), I think the best approach > to handling the "type" attribute is to start with the coarsest > classification

RE: A problem with one instruction multiple latencies and pipelines

2020-09-07 Thread Qian, Jianhua
n, Jianhua/钱 建华 > Cc: gcc@gcc.gnu.org > Subject: Re: A problem with one instruction multiple latencies and pipelines > > "Qian, Jianhua" writes: > > Hi > > > > I'm adding a new machine model. I have a problem when writing the > "define_in

Re: A problem with one instruction multiple latencies and pipelines

2020-09-07 Thread Richard Sandiford
"Qian, Jianhua" writes: > Hi > > I'm adding a new machine model. I have a problem when writing the > "define_insn_reservation" for instruction scheduling. > How to write the "define_insn_reservation" for one instruction that there are > different latencies and pipelines according to parameter.

Re: A problem with one instruction multiple latencies and pipelines

2020-09-07 Thread Richard Biener via Gcc
On Mon, Sep 7, 2020 at 10:46 AM Qian, Jianhua wrote: > > Hi Richard > > > -Original Message- > > From: Richard Biener > > Sent: Monday, September 7, 2020 3:41 PM > > To: Qian, Jianhua/钱 建华 > > Cc: gcc@gcc.gnu.org > > Subject: Re: A pr

RE: A problem with one instruction multiple latencies and pipelines

2020-09-07 Thread Qian, Jianhua
Hi Richard > -Original Message- > From: Richard Biener > Sent: Monday, September 7, 2020 3:41 PM > To: Qian, Jianhua/钱 建华 > Cc: gcc@gcc.gnu.org > Subject: Re: A problem with one instruction multiple latencies and pipelines > > On Mon, Sep 7, 2020 at 8:10

Re: A problem with one instruction multiple latencies and pipelines

2020-09-07 Thread Richard Biener via Gcc
On Mon, Sep 7, 2020 at 8:10 AM Qian, Jianhua wrote: > > Hi > > I'm adding a new machine model. I have a problem when writing the > "define_insn_reservation" for instruction scheduling. > How to write the "define_insn_reservation" for one instruction that there are > different latencies and

A problem with one instruction multiple latencies and pipelines

2020-09-07 Thread Qian, Jianhua
Hi I'm adding a new machine model. I have a problem when writing the "define_insn_reservation" for instruction scheduling. How to write the "define_insn_reservation" for one instruction that there are different latencies and pipelines according to parameter. For example, the ADD (shifted