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]

[AST-optimizer-branch] Double chaining statements (proposal)


Hi,

C and C++ statements don't use 'type' field : this field is used only 
in expression nodes.

struct tree_common
{
  tree chain;
  tree type;
  void *aux;
...
}

We could use it to hold information about the previous statement
and make analysis and transformation of statements simpler.

I propose to complete the tree interface with the following macro :
#define TREE_PREV(STMT) TREE_TYPE (STMT)
and either modify front-ends, or introduce this information during 
the simplify pass.

Comments, suggestions, ... ?

Seb.


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