[PATCH] D37957: [TableGen] Some simple optimizations to TableGen execution time

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 17 12:11:56 PDT 2017


zturner added a comment.

In https://reviews.llvm.org/D37957#873349, @craig.topper wrote:

> Is it the PadToColumn calls that are slowing down the formatting?


I think it's the fact that every character of every write must be examined in order to find newlines.

One potential optimization that might still work with formatting is to provide a method on the stream called `writeLine`, where you don't specify the newline but it puts one for you, and assumes that there are no other newlines in the input.  This would allow us to get rid of the character scan.


https://reviews.llvm.org/D37957





More information about the llvm-commits mailing list