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]

Re: [tuples] gimple_assign_subcode for GIMPLE_SINGLE_RHS


On 3/9/08 9:24 AM, Richard Guenther wrote:

So as opposed to a unary operation which would look exactly the same apart
from having a subcode?  So what does gimple_assign_subcode () return
for the GIMPLE_SINGLE_RHS case?  Some random garbage?

No. A unary operation is different. For instance, NEG_EXPR:


a = -b

The operator is NEG_EXPR, with the single operand VAR_DECL<b>.

When we deal with a unary operator T, the RHS will not have T, it will have TREE_OPERAND (T, 0). However, for a "single" or "copy" operand T (say a VAR_DECL or CONST_INT or SSA_NAME), the RHS will contain T itself.


Seems I need to look at the tuples branch closer.  Is there some overview
documentation available that explains all the above?

Yes, Aldy and I are working on the tutorial for the summit. It's still very crude (I'm not sure if the different RHS classes are discussed yet). The function you want to look at is get_gimple_rhs_class()


http://docs.google.com/Doc?id=dgfkmttj_107hcr98sg3



Diego.


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