RFR (XL): 6934604: enable parts of EliminateAutoBox by default
Vladimir Kozlov
vladimir.kozlov at oracle.com
Tue Apr 30 19:46:45 PDT 2013
http://cr.openjdk.java.net/~kvn/6934604.v2/webrev/
Resurrected autobox elimination code and enabled it by default.
Added new experimental C2 flag in preparation for 8012974.
After static fields were moved to JavaMirror the existing autobox
elimination code (LoadNode::eliminate_autobox()) stopped working because
graph was changed. Fixed it for loading from Boxing cache array, moved
spit through Phi code from eliminate_autobox() to
LoadNode::split_through_phi(). Also use incremental inlining to delay
inlining of valueOf() methods to get value from argument. Mark such
method as Macro nodes and treat them the same way as Allocations. Added
value load from constant boxing objects. Eliminated MemBarRelease for
non-escaping allocations (such membar generated when final fields are
initialized in constructor).
Did not get any significant performance improvements because very few
places have opportunity for current optimization (when all objects do
not escape).
Additional changes:
Added ability to recompile method without EliminateAutoBox if
compilation with it failed.
Added assert live_nodes < MaxNodeLimit into Node costructor.
Added timer for incremental inlining.
Fixed TypeAryPtr::narrow_size_type() to return correct type for
arr[MAXINT] (currently it returns incorrect arr[0]).
Moved the check in assert to condition in loopPredicate.cpp because I
hit the problem during CTW testing.
Fixed tiered compilation process dependence on the order of -Xcomp
-XX:+TieredCompilation flags.
Added regression tests.
Tested with jprt, ctw, nashorn.
Thanks,
Vladimir
More information about the hotspot-compiler-dev
mailing list