> > It's more of a debugging tool and stress test of the x86 branch relaxation than anything. It's definitely not intended to be an optimization. > > "relax-all" says to not just relax instructions that are strictly required, but to relax every instruction that can be relaxed, whether it's needed or not. > > I'm more inclined to remove the command line options entirely, especially the clang one.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 stable. Eli
> 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 > stable.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.> EliCheers, Rafael
> 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. >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). Eli