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]

[tree-ssa] We are removing annotations, or are we???


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.

Gr.
Steven


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