On Mon, 2005-04-25 at 17:55, Kazu Hirata wrote:
> Hi Andrew,
> 
> > How is the get_stmt_ann (stmt) going to work from the caller of
> > create_ssa_artificial_load_stmt() when it goes to look at the operands
> > for its new "stmt"?   
> 
> I am going to replace that particular call to get_stmt_ann with a call
> to create_stmt_ann.  The beginning of create_ssa_artficial_load_stmt
> would look like
> 
>   /* Make sure we don't have a stmt_ann already.  */
>   gcc_assert (stmt_ann (stmt) == NULL);
> 
>   /* Create a standalone stmt_ann that is not a part of
>      tree_statement_list_node.  */
>   create_stmt_ann (stmt);
> 
> > The annotation was simply attached to the stmt before, so it was
> > easy to locate.  There is no bsi_for_stmt() since it isnt a real
> > stmt, so you can't get to a stmt_list node that way either.  Im not
> > sure how you would locate the annoation for a fake stmt like this.
> 
> I am going to keep stmt_ann() so that you can get to stmt_ann from
> stmt even for a fake statement.

OK, let me word it a different way.  What is create_stmt_ann (stmt)
going to do with the annotation it creates? You are moving the
stmt_ann_t pointer from the stmt node to the tree_statement_list_node...
so there will be nothing in the stmt node to attach the annotation to
like there is now.

  Having the annotation hanging in space isnt going to help when DOM's
equivalency routine takes a stmt and asks for the USE_OPS of that stmt. 
Some of those stmts it is looking at will be real stmts, and some will
be these fake stmts.. it doesn't know which is which, but it needs a
consistant place to find the operand cache.


I though the whole point of this exercise was to remove the stmt_ann_t
pointer from the stmt node, and put it directly in the
tree_statement_list_node.  Im saying that will not work until you either
change DOM to not use these fake stmt's, or figure out some way of
associating a stmt_ann to these fake stmts.


Andrew


Reply via email to