public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* what does the calling for min_insn_conflict_delay mean
@ 2009-09-20 13:53 Amker.Cheng
  2009-09-21 22:15 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Amker.Cheng @ 2009-09-20 13:53 UTC (permalink / raw)
  To: gcc

Hi :
   In function new_ready, it calls to min_insn_conflict_delay with
"min_insn_conflict_delay (curr_state, next, next)".
But the function's comments say that it returns minimal delay of issue of
the 2nd insn after issuing the 1st in given state.
Why the last two parameter for the call are both "next"?
seems conflict with the comments.

Thanks.

-- 
Best Regards.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: what does the calling for min_insn_conflict_delay mean
  2009-09-20 13:53 what does the calling for min_insn_conflict_delay mean Amker.Cheng
@ 2009-09-21 22:15 ` Ian Lance Taylor
  2009-09-22 15:50   ` Vladimir Makarov
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2009-09-21 22:15 UTC (permalink / raw)
  To: Amker.Cheng; +Cc: gcc, vmakarov

"Amker.Cheng" <amker.cheng@gmail.com> writes:

>    In function new_ready, it calls to min_insn_conflict_delay with
> "min_insn_conflict_delay (curr_state, next, next)".
> But the function's comments say that it returns minimal delay of issue of
> the 2nd insn after issuing the 1st in given state.
> Why the last two parameter for the call are both "next"?
> seems conflict with the comments.

This change dates back to the first DFA scheduler patch.  It does seem a
little odd, particularly as the call in new_ready is the only use of
min_insn_conflict_delay.  CC'ing vmakarov in case he remembers anything
about this old code.

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: what does the calling for min_insn_conflict_delay mean
  2009-09-21 22:15 ` Ian Lance Taylor
@ 2009-09-22 15:50   ` Vladimir Makarov
  2009-09-23  9:34     ` Amker.Cheng
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Makarov @ 2009-09-22 15:50 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Amker.Cheng, gcc

Ian Lance Taylor wrote:
> "Amker.Cheng" <amker.cheng@gmail.com> writes:
>
>   
>>    In function new_ready, it calls to min_insn_conflict_delay with
>> "min_insn_conflict_delay (curr_state, next, next)".
>> But the function's comments say that it returns minimal delay of issue of
>> the 2nd insn after issuing the 1st in given state.
>> Why the last two parameter for the call are both "next"?
>> seems conflict with the comments.
>>     
>
>   
Amker, thanks for finding this issue.
> This change dates back to the first DFA scheduler patch.  It does seem a
> little odd, particularly as the call in new_ready is the only use of
> min_insn_conflict_delay.  CC'ing vmakarov in case he remembers anything
> about this old code.
>   
I've not remembered this.  I guess  it was a result of long period of 
transition from the old pipeline hazard recognizier to the DFA one which 
required to rewrite all old pipeline descriptions.

Also after starring at this code for some time,  I don't like this 
code.  Now I'd use min_issue_delay (curr_state, next) which is delay of  
issuing  next in the current function unit reservation state instead of  
min_insn_conflict_delay (curr_state, next, next) which is a delay of 
issuing the first insn (next) after issuing the second insn (next) on a 
free processor (when all function units are free).  Probably it was a 
typo.  Although I think that such change (in many other conditions to 
move insn speculatively to the ready list) will not give a visible 
improvement for most processors, I'll try it.

It looks to me that probably I had also some plans for usage of 
min_insn_conflict_delay, but I forgot them because it was long ago.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: what does the calling for min_insn_conflict_delay mean
  2009-09-22 15:50   ` Vladimir Makarov
@ 2009-09-23  9:34     ` Amker.Cheng
  0 siblings, 0 replies; 4+ messages in thread
From: Amker.Cheng @ 2009-09-23  9:34 UTC (permalink / raw)
  To: gcc; +Cc: Ian Lance Taylor, Vladimir Makarov

On Tue, Sep 22, 2009 at 11:50 PM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Ian Lance Taylor wrote:
>>
>> "Amker.Cheng" <amker.cheng@gmail.com> writes:
>>
>>
>>>
>>>   In function new_ready, it calls to min_insn_conflict_delay with
>>> "min_insn_conflict_delay (curr_state, next, next)".
>>> But the function's comments say that it returns minimal delay of issue of
>>> the 2nd insn after issuing the 1st in given state.
>>> Why the last two parameter for the call are both "next"?
>>> seems conflict with the comments.
>>>
>>
>>
>
> Amker, thanks for finding this issue.
It's great pleasure if can help anything.

>>
>> This change dates back to the first DFA scheduler patch.  It does seem a
>> little odd, particularly as the call in new_ready is the only use of
>> min_insn_conflict_delay.  CC'ing vmakarov in case he remembers anything
>> about this old code.
>>
>
> I've not remembered this.  I guess  it was a result of long period of
> transition from the old pipeline hazard recognizier to the DFA one which
> required to rewrite all old pipeline descriptions.
>
> Also after starring at this code for some time,  I don't like this code.
>  Now I'd use min_issue_delay (curr_state, next) which is delay of  issuing
>  next in the current function unit reservation state instead of
>  min_insn_conflict_delay (curr_state, next, next) which is a delay of
> issuing the first insn (next) after issuing the second insn (next) on a free
> processor (when all function units are free).  Probably it was a typo.
>  Although I think that such change (in many other conditions to move insn
> speculatively to the ready list) will not give a visible improvement for
> most processors, I'll try it.
>
> It looks to me that probably I had also some plans for usage of
> min_insn_conflict_delay, but I forgot them because it was long ago.
>
>

Is it the delay of issuing next in the current reservation state which
expected here?

seems the call to min_insn_conflict_delay does nothing harm, except
may result in
more or less speculative motions(which are all valid ones).

-- 
Best Regards.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-23  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-20 13:53 what does the calling for min_insn_conflict_delay mean Amker.Cheng
2009-09-21 22:15 ` Ian Lance Taylor
2009-09-22 15:50   ` Vladimir Makarov
2009-09-23  9:34     ` Amker.Cheng

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).