>> involve code motion. Such limitation happens because the bound cheks
>> break the control flow graph into smaller basic blocks; hence,
>> preventing code from moving across larger program regions.
>
> Could you describe this a little more? In IonMonkey, we can hoist bounds
> checks, and there are no explicit dependencies between bounds checks and
> further instructions (though the check itself is never removed by DCE).
I wrote it like this because an array bounds check is implemented as a
conditional. There are some code optimizations, such as local register
allocation
and partial redundancy elimination that suffer with a more fragmented
control flow graph. So, I think that by removing more bound checks we
may also enable further optimizations.
>
>
>> (2 weeks) Make IonMonkey able to generate the extended SSA (e-SSA)
>> graph, which encodes the scope of constraints, from its available SSA
>> intermediate representation. We have implemented a pass to convert
>> code to e-SSA form in LLVM. It is very fast, taking negligible time,
>> and increasing program sizes by 7% on average. Basically, we have to
>> split the live ranges of variables used at conditionals. Given that
>> IonMonkey already gives us def-use chains, we can quickly rename
>> variables after live range splitting.
>
>
> What does live-range splitting mean here?
It is like this: ABCD is a sparse analysis. It means that the
information that it finds must be true along the entire live range of
the variable. In this case, the information is "variable x is less
than variables {x0, x1, ..., xn}". This is called the "less-than"
lattice. But, in order to be precise, the ABCD must learn information
out of conditionals. If we have a program like:
if (x < a.length) {
...
// we know that x < a.length here
...
} else {
...
// we know that a.length <= x here
...
}
Then, we need a different version of x in the then part and in the
else part of the branch. The ABCD algorithm achieves this by splitting
the live ranges of x via copy instructions:
if (x < a.length) {
x0 = x;
// rename every use of x to x0 in the 'then' clause
...
} else {
x1 = x;
// rename every use of x in to x1 in the 'else' clause
...
}
>> (3 weeks) Implement the demand-driven constraint solver, which favors
>> performance of a single-check analysis.
>
> Out of curiosity, how is performance determined?
In the original paper, it was measured in runtime of ABCD algorithm +
runtime of benchmark.
>
> - I highly recommend doing the limit study, because we've found that the
> effect of specific optimizations can be small on benchmarks, and can be
> swamped by basic engineering stuff. You'll want to know how much perf you
> might be able to get before you start.
Right. How should a good limit study be? I mean, which kind of info
you guys think would be the most useful to get now?
> - I emphasize that because I reread the ABCD paper a while back while
> planning IonMonkey. At the time I decided that there were probably
> simpler techniques for eliminating most range checks that would have
> less complexity and better compile time, so I didn't pursue it.
I see. Yes, many optimizations that are designed for JITs wound up not
being used because they take too long to run. But, according to the
original authors, ABCD has been specifically designed to run fast.
Maybe an initial implementation could be useful to you guys, so that
either you would have something that is worth improving (as it has the
potential to deliver good results), or you could decide that a lighter
algorithm is necessary to be used in a JIT compiler. If you have ideas
of how to make ABCD even faster, I would be very happy to give them a
try.
> - As an alternative IonMonkey idea, you might want to look into inlining
> objects into stack frames via escape analysis. We actually don't know how
> much effect it would have yet, and it also interacts with GC, which is in
> flux, but we've been pretty curious if it would help our perf.
>
> - Another idea is to look at a better alias analysis for IonMonkey.
> Currently it's using something very simple, along the lines of "a.b
aliases
> c.d" for any a,b,c,d. Again, we don't know how much it will help yet.
Actually, the Summer of Code rules allow me to write more than one
proposal. If you guys prefer, I can write a new document. Or I could
put some effort in getting the limit study ready before the deadline
(Friday). What do you think should be better?
Regards,
2012/4/4 Andrew McCreight <
amccr...@mozilla.com>
> Another thing to keep in mind is that the original implementation in
> Jalapeno of the ABCD algorithm only deals with either upper or lower bounds
> (I forget which) and IIRC didn't worry about integer overflow. So there
> may be some nasty details to wrangle over if you want to get it to a
> landable state.
>
> If you decide to work on this, I worked on a sort of verification of an
> implementation of ABCD a while ago, so I may have some residual knowledge
> of ABCD rattling around in my brain I can help you with.
>
> Andrew
>
> ----- Original Message -----
--
Péricles <
http://dcc.ufmg.br/%7Epericlesrafael>