[LLVMdev] questions about the mc-relax-all flag
Rafael EspĂndola
rafael.espindola at gmail.com
Fri Dec 7 07:22:47 PST 2012
>> It is not used on optimized builds because it produces larger binaries.
>>
>
> Yep. So if we intend to keep it around I propose to rename it to
> -mc-optimize-relaxation, or -mc-fast-relaxation or something of the
> sort (I think that the flag is obscure enough to deserve a long,
> verbose and descriptive name).
So, normally "optimize" in a compiler means "produce better code", not
"produce code faster", so -mc-optimize-relaxation would be more
confusing IMHO.
A relaxation in an assembler is the act of replacing an instruction
with a more generic one. An add that takes a 8 bit immediate with one
that takes a 32 immediate for example. For that reason I think the
current name is fine: the option makes the assembler relax every
instruction it can to the most generic available. This produces larger
code, but the assembler doesn't spend time figuring out if the more
specific version works or not.
> Eli
Cheers,
Rafael
More information about the llvm-dev
mailing list