[tree-ssa] PATCH: collect labels for SWITCH_EXPR

law@redhat.com law@redhat.com
Thu Apr 24 20:10:00 GMT 2003


In message <wvlist3n1yk.fsf@prospero.boston.redhat.com>, Jason Merrill writes:
 >--=-=-=
 >
 >I've been threatening to do this for a while.  After this patch, a GIMPLE
 >SWITCH_EXPR has as its third operand a TREE_VEC of LABEL_DECLs representing
 >all of the possible targets of the switch.
 >
 >This patch also adds a third operand to CASE_LABEL_EXPR, namely the
 >associated LABEL_DECL.
 >
 >Optimizing folks: Will this be useful to you?  Would something else be more
 >useful?
Possibly, I hadn't thought much about it.

Now, if we had access to the red-black tree structure used inside stmt.c
to organize the nodes, that would definitely be helpful in terms of
generating proper warnings and the like without my disgusting hack from
last month.


 >The simplify_cond_expr patch should speed up gimplification a bit by
 >avoiding re-gimplifying some if statements.
Sounds good.

Jeff



More information about the Gcc-patches mailing list