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 15:41, Andrew MacLeod wrote:
> BB26
> new_label_1:
> goto new_label_2;
> BB100
> default:
> copy_stmt;
> BB101
> new_label_2:
> code;
>
> The only difference is that (upon reflection), new_label_1 serves no
> purpose.... and default is still the label the switch targets.
>
Agreed.
> So I use
> the labels the other way around from you. Isnt that exactly the same
> solution only without changing it to a multi-branch system? Which means
> the same thing would then work if it were changed to multi-branch
> eventually. Or am I missing something?
>
Yup, same thing. And this actually works with any two case labels that
fall through to each other, right? The difference is that with MBRs we
would probably not need to insert additional GOTOs, as they would
already be there. But it's friday and my brain is rapidly
deteriorating.
Diego.