OSDN Git Service

[TableGen] Generate formatted DAGISelEmitter without relying on formatted_raw_ostream.
authorCraig Topper <craig.topper@intel.com>
Tue, 19 Sep 2017 21:03:57 +0000 (21:03 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 19 Sep 2017 21:03:57 +0000 (21:03 +0000)
commitcdcb6d16fc52759bb607eaa2badbbe1ff5600495
treea1175387dc622f48d6496cd8675344f92d74fb3c
parentfd65d0d80e980280183a3c319f08e8e5f61da609
[TableGen] Generate formatted DAGISelEmitter without relying on formatted_raw_ostream.

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 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.

Differential Revision: https://reviews.llvm.org/D37966

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313674 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/DAGISelMatcherEmitter.cpp