RFR(M): 8031754: Type speculation should favor profile data from outermost inlined method (original) (raw)

Roland Westrelin roland.westrelin at oracle.com
Thu Feb 6 08:45:53 PST 2014


Hi Vladimir,

In general I am comfortable to have inlinedepth as additional type's attribute. But only for speculative types when it make sense.

So why you keep inlinedepth in removespeculative()? Because it’s never used in practice with non speculative types (it should always be InlineDepthBottom for a non speculative type). The only place where it changes the behavior of compilation is in GraphKit::recordprofileforspeculation() where it’s used only for speculative types. Anyway, I can reset it to InlineDepthBottom in removespeculative() if you like. Yes, please, set to InlineDepthBottom. It will be consistent with types without speculative types.

Actually, that’s not possible. Because then, that code:

2589 if (res_oopptr->remove_speculative() == res_oopptr->speculative()) { 2590 return res_oopptr->remove_speculative();

in TypeOopPtr::xmeet()

doesn’t trigger if res_oopptr has an inline depth of InlineDepthTop. remove_speculative() transforms it to InlineDepthBottom. And the type system is no longer symmetric.

Instead shouldn’t I assert in remove_speculative() that if _speculative is non NULL then _inline_depth is InlineDepthTop or InlineDepthBottom?

Roland.



More information about the hotspot-compiler-dev mailing list