I'm trying to set the default optimizations for mips16.
Mips16 is a processor mode for code size compression.
So for clang I want to add -Os, I think.
In general I don't want the compiler to automatically inline, I think.
I assume that clang would do some trivial inlines but have not checked.
Anything else I should add to clang?
What about LLVM?
There is no -Os there.
Tia.
Reed
I don't quite understand your question. Clang already supports -Os option.
Evan
I don't quite understand your question. Clang already supports -Os option.
Evan
Okay.
Do I need to add anything to the llc command line?
I don't quite understand your question. Clang already supports -Os option.
Evan
Okay.
Do I need to add anything to the llc command line?
No. It's captured as a function attribute.
Evan
Does -O0 disable inlining?
clang -O0 still runs the AlwaysInliner pass. The C always_inline attribute has to take effect at every optimization level.
-Chris