[llvm-commits] [PATCH] MCAssembler Performance: Lazy invalidation

David Meyer pdox at google.com
Tue Dec 14 11:02:20 PST 2010


New patch attached, which respects the fact that sections have been
decoupled.

I've also attached contrived.s, which assembles in 0.284 seconds with gas,
but takes hours with llvm-mc.

It is true that this patch causes code quality to reduce ever-so-slightly,
because we might not benefit from labels compressing due to aligns shrinking
after relaxation. But that hardly seems worth the sacrifice in CPU time.

This patch causes one test fail (test/MC/MachO/relax-recompute-align.s),
which needs to be altered.


Other ideas I had but didn't implement:


> *) Have a working list of fragments that might need to be relaxed, that way
> you don't revisit every fragment on every pass.
>

I've implemented this. Would you like a patch?

Thanks,
- David Meyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101214/81d33191/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: contrived.s
Type: application/octet-stream
Size: 848247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101214/81d33191/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: invalidate-new.patch
Type: application/octet-stream
Size: 864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101214/81d33191/attachment-0001.obj>


More information about the llvm-commits mailing list