This patch contains code to perform a loop versioning
optimisation phase. Loop versioning replicates loop
bodies and removes from one of those loop bodies
runtime exceptions that can be explicitly tested. The
phase runs as an SSA optimisation so as only to
consider true dependencies. To capture the loop
structure the phase uses an annotated LST node. The
annotations capture information about the initial and
terminal loop iterator values, as well as the loop
iterator instructions.
The current loop unrolling optimisation phase creates
loops unsuitable for versioning. However, disabling
loop unrolling results in bug 1363830 "Lack of loop
unrolling causes stack overflow". For this reason the
loop versioning optimisation is disabled in this patch
but can be enabled with the switch
-X:opt:loop_versioning=true.
The performance benefit of the patch on SpecJVM
mpegaudio (on my Athlon XP 2600+) is to go from ~4.5s
to ~4s on the best of 10 runs with a development build
and the rvm flags of -X:aos:initial_compiler=opt
-X:irc:O2. There's more data in
ftp://ftp.cs.man.ac.uk/pub/apt/papers/JishengZhao_PREP05_Paper.pdf,
however, I've tweaked the optimisation yet further from
there.
STATEMENT OF ORIGIN FOR MULTIPLE CONTRIBUTORS
We, Ian Rogers, and Jisheng Zhao:
(a) represent that either:
(i) We are the only authors and owners of the
contributed software
(described as/entitled Loop Versioning),
which was neither derived nor copied from any
other software,
or
(ii) that any exception to (i) is software which was
obtained under the
CPL (Common Public License),
and
(b) hereby agree to license this contributed software
under the CPL.
The main loop versioning files
This file contains diffs needed to enable loop versioning
Logged In: YES
user_id=308843
The attached patch enables access to the loop versioning
code to the appropriate parts of the loop structure tree
data structure. The patch also fixes a bug in OPT_IRTools
that was discuss on the jikesrvm core mailing list. It also
adds the loop versioning code to the build process and
tweaks loop unrolling so it isn't performed in conjunction
with versioning.
Logged In: YES
user_id=1215435
looks good at first glance. I'll make some time next week
to process this and possibly look into associated loop
unrolling problems. About to head out for Thanksgiving
holiday, so won't get to it this week.
Logged In: YES
user_id=308843
Hi Dave, I hope thanks giving was good. Any progress with
the patch?
Thanks, Ian
Logged In: YES
user_id=1215435
patch commited; haven't had a chance to look into
interactions with loop unrolling yet.
Logged In: YES
user_id=308843
Hi Dave,
my error, please could you remove the file:
src/vm/compilers/optimizing/optimizations/global/ssa/loopAnalysis/OPT_FissionOfArrayGuards.java
it has now become OPT_LoopVersioning, the file with fission
in its name is no longer used or built into the system (I
renamed it after reading the papers on Ninja).
There are also some regression problems with copyright
notices. Let me know if you need a new patch.
Thanks, Ian