Hi Nathan I looked into tree.def, I added a case in the new gimple pass to count the number of integer variables in the c code. the following is the piece of code. Here, the first case is working, but I'm not getting the second one. can u pls help in this regard. How to trace thru the other codes & there usage switch (TREE_CODE(stmt)){ case GIMPLE_MODIFY_STMT: lval=GIMPLE_STMT_OPERAND(stmt,0); rval=GIMPLE_STMT_OPERAND(stmt,1); if(TREE_CODE(lval) == VAR_DECL) { if(!DECL_ARTIFICIAL(lval)){ //print_generic_stmt(stderr,stmt,0); numassigns++; } totalassigns++; } break; case DECL: if(TREE_CODE(stmt) == VAR_DECL){ if(TREE_CODE(TREE_TYPE(stmt))==INTEGER_TYPE){ intvar++; } } break;
Nathan Froyd-2 wrote: > > On Fri, Jul 24, 2009 at 05:20:16AM -0700, pms wrote: >> But I want to know what are the TREE_CODEs for other remaing constructs >> viz declration stmt, conditions, count for constants and how to use them >> in >> the gimple pass. Can anybody help in this regard > > The names are defined in tree.def. > > -Nathan > > -- View this message in context: http://www.nabble.com/Gimple-Pass-tp24643577p24657080.html Sent from the gcc - Dev mailing list archive at Nabble.com.