This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: tidy get_expr_operands
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 15 Jul 04 22:59:56 EDT
- Subject: 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.)