public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* questions about dependence analysis in CG
       [not found] <BLU124-W1794E94E215516BE91DF9CC9560@phx.gbl>
@ 2012-03-07 18:42 ` Peng Zhao
  2012-03-08  6:21   ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Zhao @ 2012-03-07 18:42 UTC (permalink / raw)
  To: gcc gcc, rguenther






Hello,

I am a little confused by the code in sched-deps.c. 

1. what is the purpose of the reg_note and ds_t? I see the function dk_to_ds, and the comment in sched-int.h, "Dependence on instruction can be of multiple types
(e.g. true and output). This fields enhance REG_NOTE_KIND information of the dependence.". What is enhanced from REG_DEP_TRUE to DEP_TRUE?

in struct _dep, I only find the dependence that is related with REG_NOTE (or registers). Even ds_t only as DEP_TRUE/DEP_OUTPUT/DEP_ANTI. Does this mean that gcc doesn't differentiate reg dependence and memory dependence?

Where can I find information about memory dependences such as a write and read on elementa[100] ? Sometimes meory dependence should be handled differenly with reg dependece in CG, such as the latency between the producer and the consumer.

2. What different purpose are haifa_note_mem_dep and haifa_note_dep for?

thanks 		 	   		  

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

* Re: questions about dependence analysis in CG
  2012-03-07 18:42 ` questions about dependence analysis in CG Peng Zhao
@ 2012-03-08  6:21   ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2012-03-08  6:21 UTC (permalink / raw)
  To: Peng Zhao; +Cc: gcc gcc, rguenther

Peng Zhao <blue_3too@hotmail.com> writes:

> 1. what is the purpose of the reg_note and ds_t?

The reg-note lives in the RTL.  ds_t is the same information represented
as a bitflag.  E.g., see how the bits are accumulated in a ds_t variable
in ask_dependency_caches.

> Where can I find information about memory dependences such as a write
> and read on elementa[100] ? Sometimes meory dependence should be
> handled differenly with reg dependece in CG, such as the latency
> between the producer and the consumer.

The reg-notes do handle some memory dependencies.  Also, see
true_dependence and friends in alias.c.  Richard Guenther probably has a
better answer.

> 2. What different purpose are haifa_note_mem_dep and haifa_note_dep for?

To add a memory dependency.

Ian

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

end of thread, other threads:[~2012-03-08  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <BLU124-W1794E94E215516BE91DF9CC9560@phx.gbl>
2012-03-07 18:42 ` questions about dependence analysis in CG Peng Zhao
2012-03-08  6:21   ` Ian Lance Taylor

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