This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patches] flow based jump pass take 2


> One thing we could do better here is handle cases like
> 
> 	A
> 	|
> 	B
> 	|
> 	C<-
> 	\_/
> 
> and
> 
> 	A<-
> 	| |
> 	B |
> 	\_/
> 
> which should both be reduced to a single infinite loop.
> 
> Something to think about...
Yes, as I've mentioned I want to handle these by  "stop bit"
Basically when I detect infinite loop, I drop an "stop bit" in the
basic block I've visited last.  This is an random basic block in the loop.

Then all other redirection will stop when reaching the bit, so all edges
will end up pointing to that single branch converting loop into the
pleasant scenario of one label one loop.

What I need is to decide how I put flag on the basic blocks.  Basically
I want ot make pass as cheap as possible, to make it possible run very often.
It seems to me that all I need is "stop bit" and "forwarder" flag.

So perhaps I can turn aux into enum of integer and pointer and use it for
flags directly, so I avoid memory allocation and AUX redirecting before
pass.

At the moment I am shooting for corectness of the patch.  There are some dark
sides, such as USE and CLOBBER expressions.  Old jump pass takes a lot of
care to move them when restructuring flowgraph.  I simply zap them and I am
not sure this is good idea.

I must say I've expected today to have my inbox full of unhappy emails about
broken bootstraps. I didn't happen so far.
At least CC0 targets must be broken, I am sending an patch shortly.

Honza
> 
> 
> r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]