The HotSpot compiler has enough to do working with live code, so making useful 
output for dead code is a very low priority.  I suggest using PrintAssembly to 
see what you get.  But I don't see a reason to care about it.  You can't 
extrapolate the optimizer's actions on provably dead values to actions on real 
code; the inputs are way different.

Given that 'total' is a dead value, you will end up with an empty loop.  The 
loop probably disappears also.  So your dead method will have an empty body.  
Perhaps it will deopt at the end of the loop, if the exit branch is not taken 
until after compilation.

> 1%   com.kodewerk.mbm.DeadCode::deadMethod @ 12 (33 bytes)
= compilation task 1, type = osr, osr entry point = bci:12

> 19    com.kodewerk.mbm.DeadCode::deadMethod (33 bytes)
= compilation task 19, type = normal (entry point = bci:1)

Best wishes,
-- John

-- 
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.

Reply via email to