[LLVMdev] Suggestions for optimizations

Hal Finkel hfinkel at anl.gov
Mon Jun 30 15:53:14 PDT 2014


Hi,

I think the most-useful thing to do would be to file bug reports for these, with the original C code and the comparative analysis of the assembly for some in-tree target (such as MIPS). Please make sure to include exactly what optimization level and target you used, and if possible, some explanation of what should be done better.

 -Hal

----- Original Message -----
> From: husar at codasip.com
> To: llvmdev at cs.uiuc.edu
> Sent: Tuesday, June 10, 2014 4:49:05 AM
> Subject: [LLVMdev] Suggestions for optimizations
> 
> Hello!
> 
>    I was trying to optimize our automatically generated backend for
>    Open
> RISC and for this purpose I went through the
> gcc torture testsuite.
>    There are many programs that are better optimized by LLVM, but
>    some are
> much better optimized by gcc 4.9.
> The main limitations were is loop unrolling and structures handling.
>    Differences can be best seen e.g. when compiling for an
>    architecture
> such as MIPS, or by simply comparing the optimized LLVM IR
> with code generated by gcc for MIPS. The tests with the most
> significant
> difference are listed here:
> 
> * loop unrolling
> 
> 20000422-1.c
> 20000412-6.c
> 20050224-1.c
> 20000412-4.c
> 20100416-1.c
> 950714-1.c
> pending-4.c
> 
> * structures
> 
> 20010910-1.c (with LLVM from svn, this is even worse than LLVM 3.4)
> 20020206-2.c
> 20020402-2.c
> 
> * local arrays access
> 
> 930526-1.c
> pr32500.c
> 
> * merging same calls to one function to improve code size when
> optimized
> 
> 931004-11.c
> 
> * better default inlining (probably)
> 
> pr19005.c
> 
> * other
> 
> pr46019.c
> pr46909-1.c
> 
> 
>    We will try to improve some of these optimizations by ourselves,
>    but I
> do not know when will we get to it, so I am posing it here,
> so someone who would be interested in it can take a look at it.
> 
> Best regards
>    Adam Husar
> 
> P.S.:  Also, if someone would be interested in our automatically
> generated
> LLVM backend, you can contact me,
> or you can find additional details at www.codasip.com. We also
> provide a
> free academical license.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list