[LLVMdev] Aliasing (was Performance vs other VMs)

Jon Harrop jon at ffconsultancy.com
Sun Feb 1 08:01:20 PST 2009


On Sunday 01 February 2009 05:25:40 Ramón García wrote:
> This is not a quite fair comparison. Other virtual machines must be
> doing garbage collection, while LLVM, as it is using C code, it is
> taking advantage of memory allocation by hand.

That is an insignificant advantage in this particular case (SciMark2) because 
the memory for each test is preallocated and not part of the measurement and 
the heap and stack are both tiny during the computations so there is little 
to traverse.

I am interested in the comparative results for LLVM because I consider it to 
represent how fast my LLVM-based VM might be compared to other garbage 
collected VMs.

However, LLVM has a serious disadvantage compared to the other VMs here 
because it does not have aliasing assurances. For example, it does not know 
about array aliasing, e.g. that the subarrays in the successive 
over-relaxation test cannot overlap.

The LLVM 2.1 release notes say that llvm-gcc got alias analysis and understood 
the "restrict" keyword but when I add it to the C code for SciMark2 it makes 
no difference. Can anyone else get this to work?

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e




More information about the llvm-dev mailing list