[LLVMdev] Suggestions for optimizations
husar at codasip.com
husar at codasip.com
Tue Jun 10 02:49:05 PDT 2014
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.
More information about the llvm-dev
mailing list