[llvm-dev] GSoC and SAFECode

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 22 17:02:33 PDT 2016


Hi Michael,

> In regards to potential projects, I'd like to rewrite the SAFECode
> static array bounds check pass and add check optimizations (both to
> remove statically unnecessary checks and improve the generated code for
> remaining ones).

I'm part of team building a production quality Java JIT compiler using LLVM, and
we're very interested in making upstream LLVM work better with array bounds
checks and null checks, since IR from a Java frontend tends to have a lot of
these.  This involves better symbolic analysis (e.g. in ScalarEvolution and
LazyValueInfo); code-generation cleverness (e.g "implicit null checks" [1]); and
code duplication/specialization (e.g. the somewhat misleadingly named "inductive
range check elimination" [2]).  You can find some more detail on our work at
[3].


While I cannot mentor a project specifically aimed at SAFECode, I'm very willing
and able to mentor a project aimed at making LLVM better at generally handling
array bounds checks and null checks.  Ideally this will involve improving
existing optimization passes in LLVM, and in ways that will work well with both
Java-style array bounds / null checks and SAFECode style integrity checks.  We
can also consider building a dedicated range-analysis based bound check elision
pass if that makes more sense.


Is this something you're interested in?

-- Sanjoy


[1]:
https://github.com/llvm-mirror/llvm/blob/master/lib/CodeGen/ImplicitNullChecks.cpp

[2]:
https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp


[3]: https://www.youtube.com/watch?v=3G2Rg6GBXqA


More information about the llvm-dev mailing list