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

David Meyer pdox at google.com
Tue Dec 14 09:29:19 PST 2010


This patch moves invalidation of the layout until after all relaxations have
occurred.

This prevents wasting time recomputing portions of the layout over and over.
Computing the layout is expensive, so we want to use as much of the
information generated each time as possible, instead of throwing it away
each  time a relaxation happens.

This removes a hidden O(n^2) runtime factor (where n is the number of
fragments) which causes terrifying performance problems when assembling
really large .s file with lots of relaxable instructions.

- David Meyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101214/e1f8242e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: invalidate.patch
Type: application/octet-stream
Size: 813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101214/e1f8242e/attachment.obj>


More information about the llvm-commits mailing list