[LLVMdev] questions about the mc-relax-all flag
rafael.espindola at gmail.com
Thu Dec 6 19:43:32 PST 2012
> Hi Jim,
> I agree that relax-all will cause all instructions to be relaxed, even
> those where the fixup doesn't require it. However, I would like to
> challenge the statement that this isn't an optimization. In the link I
> posted earlier, Chris and Daniel oppose to removing relax-all
> precisely because it makes the assembler run faster.
> Had it only been a stress test, removing it would be very reasonable
> since at this point I assume the MC assembler is considered to be
I think you are right about it being an optimization (compile time
optimization to be precise). In fact, it is used by default at -O0,
run "clang -c test.c -v" and you will see -mrelax-all being passed,
but not if you add -O1.
It is not used on optimized builds because it produces larger binaries.
More information about the llvm-dev