On Mar 3, 2015, at 3:21 PM, Vladimir Ivanov <vladimir.x.iva...@oracle.com> 
> Ah, I see now.
> You suggest to conditionally insert uncommon trap in MHI.profileBoolean when 
> a count == 0, right?
> Won't we end up with 2 checks if VM can't fold them (e.g. some action in 
> between)?

Maybe; that's the weak point of the idea.  The VM *does* fold many dominating 
ifs, as you know.

But, if the profileBoolean really traps on one branch, then it can return a 
*constant* value, can't it?

After that, the cmps and ifs will fold up.

(That's what's nice about returning the profiled value, rather than just 
looking at it.)

— John
mlvm-dev mailing list

Reply via email to