AARCH64: 8139041: Redundant DMB instructions (CORRECTED )

Roland Westrelin roland.westrelin at oracle.com
Fri Oct 9 14:59:54 UTC 2015


Hi Andrew,

> There is a much simpler way: remove adjacent barriers in
> MacroAssembler.  Thanks to the way that the AArch64 ISA is designed,
> barriers can be merged simply by ORing them together.  Of course, this
> technique works for C1 and C2, and it adds essentially nothing to the
> compilation time.
> 
> http://cr.openjdk.java.net/~aph/8139041/
> 
> One thing which may be controversial is that I've added a field to
> CodeBuffer to keep track of barriers and labels.  I had to do this
> because when we're compiling there is (AFAICS) essentially nowhere
> else to keep the state.

Isn’t your new field a bit like:

  address       insts_mark() const       { return _insts.mark();       }
  void      set_insts_mark()             {        _insts.set_mark();   }
  void    clear_insts_mark()             {        _insts.clear_mark(); }

which is used in very few locations AFAIK. Do you think you could reuse that one?

Roland.


More information about the hotspot-compiler-dev mailing list