[LLVMdev] [MC] Removing relaxation control
Joerg Sonnenberger
joerg at britannica.bec.de
Thu Feb 24 10:40:04 PST 2011
Hi all,
clang -O0 currently differs from -O1 and higher in passing down
-mrelax-all. When compiling assembler files, this results in conditional
jumps using the relaxed forms, which is surprising. Based on the
discussion on IRC, I did a llvm/clang release build with -O0 for
OPTIMIZER and -O0 -mno-relax-all.
Result is:
-O0 (-mrelax-all) 68m27.893s 254m19.920s 1m45.720s
-O0 -mno-relax-all 68m6.640s 253m31.880s 1m45.310s
E.g. -mrelax-all is either harmful or not improving enough to give a
measurable improvement.
Can someone else try to reproduce this?
I've also did some testing with a worst case assembler file doing lots
of jumps that can all be relaxed. In that case, -mno-relax-all was 25%.
If the above observation can be confirmed, I believe there is no good
reason to keep -mrelax-all.
Joerg
More information about the llvm-dev
mailing list