This is the mail archive of the gcc-patches@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: [sa]: Revert partial def stuff, use fake variables instead


Hello,

> >well, if you did not start claiming that I have changed the results of
> >alias analysis, I would not have a problem with this.
> >
> You *did* change aliasing information.  You introduced a new alias 
> relation.

did I?  Could you please explain what you mean by "alias relation"?

> If I insert a statement in the IL, I have changed the CFG, 
> have I not?

Not necessarily.  If this statement does not affect control flow, it
does not change cfg.  Similarly if I perform operation that does not
change the order, locations and sizes of memory accesses, I did not
change alias information.

> >I still would have problems with understanding why are the results
> >represented in a way that makes it close to impossible to work with
> >them, rather than having a simple annotation on a memory reference whose
> >format would be independent on how the reference looks inside (in
> >particular on whether its base is a variable or a pointer).
> >
> I can't parse this.  What exactly are you proposing?  If we can find a 
> representation that's easier to work with, I'm all ears.

Having something like

struct mem_ref_ann
{
  tree tag;	/* The tag or variable associated with the reference.  */
  enum tag_type type;
		/* Type of the tag associated with the reference
		   (variable, TMT, NMT).  */
};

attached to the memory reference.  So that in get_expr_operands you
would just have

if (REFERENCE_CLASS_P (expr)
    && mem_ref_ann (expr))
  {
    tag = mem_ref_ann (expr)->tag;
    switch (mem_ref_ann (expr)->type)
      {
        /* Add whatever operands appropriate for the reference.  */
      }
  }

Instead of having to go to the base of the reference to fetch the tag in
a way dependent on how the reference looks inside.

Then everything ivopts would have to take care of is moving the
annotation from the old reference to the new one.

Zdenek


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