This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Switch stmts and inserting on edges
On Fri, 2003-05-30 at 16:27, Andrew MacLeod wrote:
> Sooo. How does a switch currently handle that? I dont think I need to
> ever worry about it. If I have:
>
> BB6:
> case 3:
> default:
> blah;
>
> Then there con only be one edge from the switch to BB6.. so inserting on
> that edge will insert code into *bopth* case 3: and default:
>
Right. There's only one edge coming in, so anything you insert on that
edge will be executed for both cases.
> So what list does the switch use? SWITCH_LABELS you said? I assume its
> just a list of labels?
>
Yes, in the form of a TREE_VEC.
> Im not changing any labels, just the block that
> a label is in, and I'll redirect the edge from the switch stmt's block
> for that. Any other little gotchyas in there I might miss by doing just
> then obvious?
>
I don't think SWITCH_LABELS is used now, actually.
Diego.