Dear Marc, Thank you very much! Just another quick question.. Can I iterate the operands of a GIMPLE statement, like how I iterate a LLVM instruction in the following way?
Instruction* instr; for (size_t i=0; i< instr->getNumOperands();i++) { instr->getOperand(i)) } Sorry for such naive questions.. I actually searched the documents and GIMPLE pretty print for a while but couldn't find such a way of accessing arbitrary numbers of operands... Best, Shuai On Mon, Jun 15, 2020 at 12:10 PM Marc Glisse <marc.gli...@inria.fr> wrote: > On Mon, 15 Jun 2020, Shuai Wang via Gcc wrote: > > > I am trying to analyze the following gimple statements, where the data > > dependency of _23 is a tree, whose leave nodes are three constant values > > {13, 4, 14}. > > > > Could anyone shed some light on how such a backward traversal can be > > implemented? Given _22 used in the last assignment, I have no idea of how > > to trace back to its definition on the fourth statement... Thank you > > very much! > > SSA_NAME_DEF_STMT > > > _13 = 13; > > _14 = _13 + 4; > > _15 = 14; > > _22 = (unsigned long) _15; > > _23 = _22 + _14; > > -- > Marc Glisse >