[PATCH] D17792: Initialize much of AssemblyWriter lazily.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 17:39:16 PST 2016


jlebar created this revision.
jlebar added a reviewer: majnemer.
jlebar added a subscriber: llvm-commits.

The AssemblyWriter constructor is in the critical path of
Value::operator<<, which in turn is in the critical path of most debug
messages.  It currently scans the entire module multiple times, even
though most of that work is usually unnecessary.  This change makes us
lazier.

With this change, I can compile a big Thrust file with
-debug-only=inline in a few minutes.  Before, I gave up after 30m.

http://reviews.llvm.org/D17792

Files:
  lib/IR/AsmWriter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17792.49571.patch
Type: text/x-patch
Size: 8852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160302/58fabc9b/attachment.bin>


More information about the llvm-commits mailing list