<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Hi,
I am looking at obtaining smaller code sizes for ARM cores. So far, I am
trying a genetic algorithm to find the best option for the opt passes and
clang/ llc flags.
I am looking at what flags and passes -Oz and the other optimization levels
enable and use. Having done something similar for gcc, I was looking for a
similar approach.
However, I was not able to find many optimization flags for clang or llc,
which made me think that in clang/llvm the optimization changes are done
mostly by selecting/removing the opt passes(flags).
In order to run what opt passes I select, I split the compilation process
in:
clang CLANG_FLAGS -emit-llvm mysource1.c -c -o mysource1.bc
opt OPT_FLAGS mysource1.bc -o mysource1.ll
llc LLC_FLAGS mysource1.ll -filetype=obj -o mysource1.o
I have also seen that for -Oz for example, the Pass Arguments appears
multiple time, does this mean that opt is run multiple times with different
passes options?
Now, my general direction questions are:
Am I on the right track with this?
Do you have any pointers or advice on this?
Thank you,
Robert</pre></div>