RFR(S): 8154135: Loop alignment may be added inside the loop body

Roland Westrelin rwestrel at redhat.com
Fri Apr 15 12:24:30 UTC 2016


Hi Vladimir,

Thanks for looking at this.

> I agree with optimization but I am not sure about changes.

Is this an optimization? It looks more like a bug to me.

> Can we check only one previous block to be more conservative?:
> 
> Block* b = prev(targ_block)
> bool has_top = targ_block->head()->is_Loop() && b->has_loop_alignment()
> && !b->head()->is_Loop()

That would be good enough as far as I can tell. Here is a new webrev:

http://cr.openjdk.java.net/~roland/8154135/webrev.01/

> Did you try to play with NumberOfLoopInstrToAlign and MaxLoopPad? May be
> for RISC cpus (with fixed instruction size) we should change them.

Thanks for the pointer. This said, I don't see what could prevent the
problem I see from happening on x86 so to me it looks like a bug, rather
than a tuning problem.

Roland.


More information about the hotspot-compiler-dev mailing list