This is the mail archive of the gcc@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: [tree-ssa] We are removing annotations, or are we???


In message <200311260025.08203.s.bosscher@student.tudelft.nl>, Steven Bosscher 
writes:
 >Hi,
 >
 >In tree-ssa.c we have a function remove_annotations_r with the following code
 >:
 >
 >  /* If the node is not a container, then it has nothing interesting
 >     underneath it.  */
 >  if (code != LOOP_EXPR
 >      && code != COND_EXPR
 >      && code != CATCH_EXPR
 >      && code != TRY_CATCH_EXPR
 >      && code != TRY_FINALLY_EXPR
 >      && code != SWITCH_EXPR
 >      && code != BIND_EXPR
 >      && code != COMPOUND_EXPR)
 >    {
 >      *walk_subtrees = 0;
 >      return NULL_TREE;
 >    }
 >
 >First of all, we should not see LOOP_EXPRs or BIND_EXPRs here (and IIRC no 
 >COMPOUND_EXPRs and not all of these exception tree codes either). Second, 
 >shouldn't we also walk into STATEMENT_LIST nodes here?
 >
 >Honza said that he though there was a sanity check that all anotations are 
 >removed somewhere, but I can't find it.
 >
 >I have no time to prepare and test a patch this week, but if I'm right, then 
 >perhaps we are indeed not clearing all the tree annotations so we cannot 
 >collect them. Thought you might want to have a look at this.
It looks like this code has not been updated with the recent IL changes.

Luckily, we no longer have special annotations on MODIFY_EXPRs.  ie, we
have statement annotations and var annotations.  So I think that code
just needs to walk over each of the statements and remove its annotation
rather than do the walk_trees stuff.

Jeff


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