On Mar 3, 2015, at 3:21 PM, Vladimir Ivanov <vladimir.x.iva...@oracle.com> 
wrote:
> 
> 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
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to