This is the mail archive of the 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: Identifying Chain of Recurrence

On Fri, May 29, 2015 at 12:41 PM, Pritam Gharat
<> wrote:
> GCC builds a chain of recurrence to capture a pattern in which an
> array is accessed in a loop. Is there any function which identifies
> that gcc has built a chain of recurrence? Is this information
> associated to the gimple assignment which accesses the array elements?
GCC analyzes evolution of scalar variables on SSA representation.
Each ssa var is treated as unique and can be analyzed.  If the address
expression itself is a ssa var, it can be analyzed by scev; otherwise,
the users of scev have to compute by themselves on the bases of other
scev vars.  For example, address of MEM[scev_var] can be analyzed by
scev; while address of MEM[invariant_base+scev_iv] is computed by
users.  Well, at least this is how IVOPT works.  You can refer to
top-file comment in tree-scalar-evolution.c for detailed information.
General routines for chain of recurrence is in file tree-chrec.c.

> Thanks,
> Pritam Gharat

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