This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about scheduler dependencies


CC: gcc@gcc.gnu.org.

On 13/03/2012, at 1:48 PM, peng zhao wrote:

> Hi, Maxim,
> 
>    Thanks a lot for  the help.
>  
>     Why are they called BEGIN_DATA and BE_IN_DATA? I was trying to find out what the names stand for but failed. what do "BE" and "IN" mean in BE_IN_DATA?

BE IN DATA speculation block.

>     My understanding is that BEGIN_DATA is for TRUE dependence that can be speculated (or overcome)

Yes.

> and BE_IN_DATA is for the data dependence edge that connects the recovery-load and the consumer of the load. Am I right?

Not exactly.  It is for data dependence edge the connects speculated load with its consumers that can be speculated (i.e., moved into a data speculation block) too.

> 
>    Can you also explain a little more about the concepts of  DEPS_LIST and INSN_LIST? I don't quite understand the comments in sched-int.h: /* If set, generate links between instruction as DEPS_LIST.
>      Otherwise, generate usual INSN_LIST links.  */
> 
>    I am assuming that the instruction means rtx, right? which field is used to link these rtx into DEPS_LIST or INSN_LIST? what is the purpose to have these 2 different scenarios?
> 

DEPS_LIST is a super-set of INSN_LIST.  I kept INSN_LIST-style dependencies to avoid overhead on targets that don't need additional features of DEPS_LIST.  Now that I look back at it, I should have removed INSN_LIST-style dependencies; I still hope to find time and clean that up (remove support for INSN_LIST-style dependencies).


> 2. Why only speculative scheduling needs DEP_STATUS?  It seems that all other schedulers have DEP_STATUS field set to -1. But 

Selective scheduler needs the additional information fields that DEP_STATUS provides; other schedulers don't (ia64 speculation aside).

--
Maxim Kuvyrkov


> > Subject: Re: Join my network on LinkedIn
> > From: maxim.kuvyrkov@gmail.com
> > Date: Mon, 12 Mar 2012 15:36:35 +1300
> > To: zhaopeng@live.com
> > 
> > On 12/03/2012, at 3:18 PM, Peng Zhao via LinkedIn wrote:
> > 
> > > LinkedIn
> > > Peng Zhao has indicated you are a Friend
> > > Hello, Maxim, 
> > > Recently I started to work on GCC and I have some questions. I would appreciate your input. 
> > > 1. what does BEGIN_DATA / BE_IN_DATA stand for? 
> > > 2. Why only speculative scheduling needs DEP_STATUS? 
> > 
> > Hi Zhao,
> > 
> > First of all, it is better to write such questions to gcc@gcc.gnu.org mailing list, so that other developers can contribute to the answer. Please CC: gcc@gcc.gnu.org on any follow ups.
> > 
> > BEGIN_DATA and BE_IN_DATA are flags that are set on dependencies, currently they can be set only for IA64 architecture, as it is the only one that supports data speculation instructions.
> > 
> > A dependency with a BEGIN_DATA flag can be broken by making the consuming instruction of the dependency start a data-speculation block. The producer in this case is always a memory store instruction and consumer is always a memory load instruction. By converting the memory load instruction to data speculative form, the dependency can be ignored. This provides greater scheduling freedom if memory store (producer) and memory load (consumer) turn out not to be aliased at run time.
> > 
> > BE_IN_DATA flags are set for consumers of the memory load that was data-speculated, i.e., it started a data-speculation block. All consumers of data-speculative memory load must be tracked for the case when speculation fails and recovery needs to be executed to preserve program correctness.
> > 
> > This is a very redacted description of the data speculation optimization, and you need to refer my original submissions to gcc-patches@ and to IA64 architecture documentation.
> > 
> > --
> > Maxim Kuvyrkov
> > 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]