This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: questions about dependence analysis in CG
- From: Ian Lance Taylor <iant at google dot com>
- To: Peng Zhao <blue_3too at hotmail dot com>
- Cc: gcc gcc <gcc at gcc dot gnu dot org>, <rguenther at suse dot de>
- Date: Wed, 07 Mar 2012 22:21:02 -0800
- Subject: Re: questions about dependence analysis in CG
- References: <BLU124-W1794E94E215516BE91DF9CC9560@phx.gbl> <BLU124-W241F7BA9CBBCA19D9EFDA8C9560@phx.gbl>
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