public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [tree-ssa] We are removing annotations, or are we???
@ 2003-11-26  1:17 Steven Bosscher
  2003-11-27  1:34 ` law
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Bosscher @ 2003-11-26  1:17 UTC (permalink / raw)
  To: law; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [tree-ssa] We are removing annotations, or are we???
  2003-11-26  1:17 [tree-ssa] We are removing annotations, or are we??? Steven Bosscher
@ 2003-11-27  1:34 ` law
  0 siblings, 0 replies; 2+ messages in thread
From: law @ 2003-11-27  1:34 UTC (permalink / raw)
  To: Steven Bosscher; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-26 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-26  1:17 [tree-ssa] We are removing annotations, or are we??? Steven Bosscher
2003-11-27  1:34 ` law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).