[PATCH] D37966: [TableGen] Generate formatted DAGISelEmitter without relying on formatted_raw_ostream.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 17 23:47:57 PDT 2017


craig.topper created this revision.
Herald added a subscriber: igorb.

The generated DAG isel file currently makes use of formatted_raw_ostream primarily for generating a hierarchical representation while also skipping over the initial comment that contains the current index.

It was reported in https://reviews.llvm.org/D37957 that this formatting might be slow due to the need to keep track of column numbers by monitoring all the written data for new lines.

This patch attempts to rewrite the emitter to make use of simpler formatting mechanisms to generate a fairly similar output. The main difference is that the number in the index comment is now right justified and padded with spaces inside the comment. Previously we appended the spaces after the comment.

I haven't done any build time measurements with this myself.


https://reviews.llvm.org/D37966

Files:
  utils/TableGen/DAGISelMatcherEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37966.115601.patch
Type: text/x-patch
Size: 16798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170918/deff5188/attachment.bin>


More information about the llvm-commits mailing list