This is the mail archive of the gcc-patches@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: tidy get_expr_operands


        * tree-ssa-operands.c (get_expr_operands): Use a switch.  Split out...
        (get_indirect_ref_operands, get_call_expr_operands): ... these.

I had a change to this that I've been hanging on to for a while that merges
the IMAGPART_EXPR, REALPART_EXPR and handled_component_p cases together since
they all have the property that you go inside operand 0 recursively and
perhaps do something with other operands.  I think it would be good to merge
that into this cleanup as well.

Also, I think there's an error in those cases in that the add_stmt_operand
call should be passed &TREE_OPERAND (expr, 0), not what it is.  This doesn't
matter since I don't think it can happen in current code, but if you also
handle VIEW_CONVERT_EXPR there, it can.

(This is part of a change to make VIEW_CONVERT_EXPR be code 'r' that used to
fix something and is no longer needed for that purpose, but I'm keeping it in
my tree since I think it's a cleanup and will allow further cleanups.)


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