Continue stmt branch prediction

Diego Novillo dnovillo@google.com
Wed Mar 12 17:54:00 GMT 2008


On 3/5/08 2:28 PM, Jan Hubicka wrote:

> I will give it one last try.  I think the misunderstanding can be here.
> The prediction hint is not affecting edges *out* of the block it sits
> in. When lowered, it is affecting all the edges that are going from
> basic block not postdominated by the block to basic block postdominated
> by the block (here the course of execution is crossing the point that it
> inavoidably leads to the place PREDICT_EXPR is).  Think of abort call:
> it is affecting all conditionals that are guarding it in the program.

Ah, I see now.  Yes, I think I finally got your point.  Adding 
PREDICT_EXPR is fine with me.

Instead of having to special-case it in places like DCE, how about we 
make it produce a value which is assigned to an artificial volatile 
global temporary?  This way, we don't need to touch the optimizers, they 
will all naturally back away from moving and/or removing it.


Diego.



More information about the Gcc-patches mailing list