[tree-ssa] edge insertion/split problem

Andrew MacLeod amacleod@redhat.com
Tue Jun 17 01:41:00 GMT 2003


On Mon, 2003-06-16 at 19:29, law@redhat.com wrote:
> In message <1055795716.8783.439.camel@p4>, Andrew MacLeod writes:

>  > Actually, maybe that is the easiest way to do it. We add an ELSE block
>  >on the fallthrough edge from a COND_EXPR if one doesn't exist. If a
>  >FALLTHRU block exists for a SWITCH, that means there is no default case
>  >right? So we can turn any code on that edge into a DEFAULT case... n'est
>  >pas?  Then no farting around with goto's.
>  >
>  >DO I have to fudge much crap to do that?. I suppose the last case in the
>  >switch might need a 'break' goto inserted. 
> Unknown.  Rather than making it the last case, I'd make it the first
> case and have an explicit break at the end of the default.  That saves
> you from having to muck around with the code for any of the other
> case values.
> 

Oh, isn't there an ordering on the cases?


>  >- if it isn't a 'goto', add a 'goto the label in DEST block'.
>  >- Create new block. Add default case. Insert code here. 
> Seems reasonable.  Note I think we have two case lists.
> 

Diego said there was a label list that we dont use... I suppose it
should be updated in case someone starts using it.


>  >I think I prefer to handle it by adding a default: case, unless there is
>  >strong objection. Then we keep the "nice clean" structure of the switch
>  >:-) ha.
> I don't have a strong objection.
> 
>  >I think I;ll just send you a patch later for the first try :-)
> OK.  I'm going to go ahead and start checking in the known working
> parts of the EH cleanup patch.  There's a fair number of bits that
> can be broken out and installed with measurable benefits.  That should
> keep me busy for the rest of today :-)

I wont get to it until late tonight now.  You should be able to give it
a try in the morning. 

Andrew



More information about the Gcc mailing list