RFR(M) 8136406: Remove ZapDeadCompiledLocals code

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Sep 15 07:22:24 UTC 2015


Dead code elimination.
I did not find any bugs since 2000 associated with ZapDeadCompilerLocals. There were few in 1999,2000 when that code was 

I do not remember ever used ZapDeadCompilerLocals. I tried today and it does not work - corresponding calls into runtime 
to check oopmap are not generated. The code has condition:

(n->as_MachSafePoint()->oop_map() != NULL);

But oop_map set only during BuildOopMaps() which is called after Insert_zap_nodes(). And we can't move 
Insert_zap_nodes() call because calls insertion should happen before short branches are processed.
So it is dead code we always had in debug Server VM.

As result of this cleaning we can remove OopMapValue::value_value used only with ZapDeadCompiledLocals - see 
OopMap::set_value(). It will allow increase maximum allocatable spill area by factor of 2. When we generate oopmaps we 
may bailout compilation when we hit this limit:

       // Check for a legal reg name in the oopMap and bailout if it is not.
       if (!omap->legal_vm_reg_name(r)) {
         regalloc->C->record_method_not_compilable("illegal oopMap register name");

Changes passed JPRT.


More information about the hotspot-compiler-dev mailing list