[llvm-commits] PATCH: clean up usage of the RelaxAll flag in MC

Eli Bendersky eliben at google.com
Mon Dec 10 12:51:34 PST 2012


Hello,

The attached patch is small but requires a bit of explanation.

It removes the RelaxAll overrule in MCAssembler::fixupNeedsRelaxation,
because that method is only getting called for MCInstFragment. These
fragments aren't even generated when RelaxAll is set, which is why the
flag reference here is superfluous. Removing it simplifies the code
with no harmful effects.

To test this I added a test to the regression suite explicitly
targeted at the RelaxAll flag, as well as assembing a largish program
with -O0 (RelaxAll by default) and observing that all the assembler
statistics remained the same.

Eli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc-remove-relaxall-use-in-fixupneedsrelaxation.patch
Type: application/octet-stream
Size: 556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121210/cf2ab943/attachment.obj>


More information about the llvm-commits mailing list