[Mono-dev] JIT register binding
Konrad M. Kruczyński
konrad.kruczynski at gmail.com
Sat May 21 05:44:35 EDT 2011
> Could you try the same code, but using LLVM as the code generation
As expected, llvm generation is as optimal, as can be seen:
No store operations and pointless data moves between register. I am
not sure what technique is used by llvm, but probably some kind of
graph coloring with foregoing register coalescing.
> But I do agree that it would be nice to fix it in the regular case.
I think there are two problems here. One is that using llvm causes
some cpu and memory overhead during compilation, so overall
application performance can be lower. The other one is that using llvm
is nonstandard: some people know that it can be used, however it is
not as easy, because it does not come in package (maybe some USE flags
can be used at gentoo). For instance, folks at alioth debian shootout
aren't using llvm with mono; these tests are mainly computational and
mono results are suboptimal. If somebody just glances at the result,
he won't probably wonder whether there are some options to improve
performance, such as llvm, or not.
Some time ago I came across an article about generation time optimized
version of graph coloring algorithm, used by llvm in their jit mode.
Maybe some kind of that should be implemented. What algorithm is used
currently? As I can tell by file name, it is probably linear scan, but
there are couple versions of linear scan and one can find a couple of
FIXMEs in the implementation so I don't know how complete is it.
Btw, as I understood from the article, llvm has a special jit mode,
where only low cost optimizations are used. Is that what mono is
More information about the Mono-devel-list