Hello all.<div><br></div><div>is it possible to use LLVM to optimize existing .NET assemblies? </div><div><br></div><div>Basically doing the following:</div><div><br></div><div>- read in MSIL and convert into LLVM internal representation</div>
<div>- perform global optimizations on LLVM internal representation </div><div>- write out optimized MSIL using the existing LLVM backend</div><div><br></div><div>I presume that the capability to convert MSIL into LLVM internal representation exists somewhere in VMKit. <br>
<div><br></div><div><br></div><div>The reason I need this is the following:</div><div><br></div><div>I have a very large C# application that is in desperate need of some optimization. The problem is that the microsoft C# compiler does almost no optimization but relies on the MS JIT compiler to do it. But the MS JIT compiler does not do any agressive optimization, especially inlining and subsequent optimizations. So the generated machine code is just atrocious and performance is much lower than expected.</div>
<div><br></div><div>I know that optimizing on a MSIL level will somewhat alleviate the problem since the microsoft C++/CLR compiler does MSIL level optimizations and produces much faster code in some tests I have written. But rewriting the application in question in C++/CLR is not an option.</div>
<div><br></div><div><br></div><div>best regards,</div><div><br></div><div>Rüdiger Klaehn</div></div>