This is the mail archive of the
mailing list for the GCC project.
Re: [tuples] gimple-tuples-branch created
> One more thing I forgot... we need to rewrite STATEMENT_LIST's into
> GIMPLE_STATEMENT_LIST's in the gimplifier so subsequent passes only have
> to deal with gimple statement lists.
More snafus along the way...
As discussed on irc, currently we have a mixture of trees and gimple
statements at the end of gimplification because we only have
GIMPLE_MODIFY_STMT's implemented. Eventually we'll have all GIMPLE_*_STMT's
implemented and post gimplification we'll *only* have gimple tuples as
So for now, let's have gimple_statement_list_node include both gimple stmt's
GTY ((chain_next ("%h.next"), chain_prev ("%h.prev")))
struct gimple_statement_list_node *prev;
struct gimple_statement_list_node *next;
struct gimple_stmt *gimple_stmt;
Then we can kludge tsi_stmt_ptr() (or in this case gsi_stmt_ptr()) to
return either gimple_stmt or stmt depending on what the node contains.
static inline tree *
gsi_stmt_ptr (tree_stmt_iterator i)
if (i.ptr->stmt != NULL_TREE)
else if (i.ptr->gimple_stmt != NULL_TREE)
return &GIMPLE_STMT_TO_TREE (i.ptr->gimple_stmt);
Notice we have to return a "tree *" anyhow, because the callers of ?si_stmt_ptr
are expecting a tree.