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

Roland Westrelin rwestrel at redhat.com
Thu Apr 14 06:46:49 UTC 2016


When running scimark on aarch64:

 ;; B16: #	B17 <- B21  top-of-loop Freq: 2305.21

  0x000003ffa126f710: add	w17, w11, w12   ;*iadd {reexecute=0 rethrow=0 return_oop=0}
                                                ; - jnt.scimark2.FFT::transform_internal at 243 (line 129)

  0x000003ffa126f714: nop
  0x000003ffa126f718: nop
  0x000003ffa126f71c: nop                       ;*iconst_2 {reexecute=0 rethrow=0 return_oop=0}
                                                ; - jnt.scimark2.FFT::transform_internal at 238 (line 129)

 ;; B17: #	B32 B18 <- B25 B16 	Loop: B17-B16 inner  Freq: 3056.06

  0x000003ffa126f720: lsl	w16, w17, #1    ;*imul {reexecute=0 rethrow=0 return_oop=0}
                                                ; - jnt.scimark2.FFT::transform_internal at 244 (line 129)

The 3 nops are added by the code that aligns loop entries: the top of
loop block is first encountered and its alignment is set, the loop head
is later encountered through the backbranch of an outer loop and its
alignment is set.

I propose that the code that aligns loop entries verifies that a loop
top doesn't exist before it sets the alignment:

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

Roland.


More information about the hotspot-compiler-dev mailing list