[LLVMdev] mem2reg optimization

Chris Lattner clattner at apple.com
Fri Oct 10 11:06:34 PDT 2008

On Oct 6, 2008, at 10:58 PM, Nicolas Capens wrote:
> Sounds like an excellent generic approach. I'd love to lend a hand to
> implement it but I'm afraid it involves a little more in-depth LLVM
> knowledge than what I currently master, so I'll leave it to Dave and  
> you for
> now...


> Talking about performance, for me this optimization was the difference
> between mem2reg taking 63% of execution time, and having it totally
> 'vanish'. It also marked the transition between rather using a  
> custom JIT
> compiler and getting really excited to use LLVM instead. :)  
> Previously I
> just assumed LLVM to be inherently slow but now I realize there's  
> still
> potential for optimization.

Hehe, we can't fix problems we don't know about :)

> Do you consider it useful if I go ahead and further identify  
> bottlenecks and
> report them or would you rather concentrate on correctness bugs for  
> now? Is
> there any list of known optimization opportunities?

Absolutely.  Different people have different focuses, and I tend to  
consider correctness/miscompilation bugs a higher priority.  However,  
compile time speed is a very high second priority to me.  Bug reports  
with testcases are extremely useful,


More information about the llvm-dev mailing list