RFR(S): 8224580: Matcher can cause oop field/array element to be reloaded
    Roland Westrelin 
    rwestrel at redhat.com
       
    Mon Jun  3 07:30:37 UTC 2019
    
    
  
Hi Dean,
Thanks for looking at this.
> It seems to do what you want, but I'm curious, what's the worse that can 
> happen if we call set_shared() on a node that doesn't need it?
Some complex match rules wouldn't trigger anymore. Let's say we have
(CmpN (LoadN ... and we erroneously call set_shared on the LoadN then
this:
instruct testN_mem(rFlagsReg cr, memory mem, immN0 zero)
%{
  predicate(CompressedOops::base() != NULL);
  match(Set cr (CmpN (LoadN mem) zero));
won't match and instead of a single instruction we would have a load
instruction followed by a comparison.
So worse case, correctness is not affected but code quality can be.
Roland.
    
    
More information about the hotspot-compiler-dev
mailing list