[TableGen] Move generated *Attr class methods out of line
authorReid Kleckner <rnk@google.com>
Thu, 12 Mar 2020 02:43:37 +0000 (19:43 -0700)
committerReid Kleckner <rnk@google.com>
Thu, 12 Mar 2020 16:07:57 +0000 (09:07 -0700)
commit7420f96924a3889af628c851ff1940aae614f3f3
treefbbb7159f17da7df83085ebf39c82009047d01cc
parente79397f5e2c6db50d8eb3642335affb5f513560e
[TableGen] Move generated *Attr class methods out of line

After this change, clang spends ~200ms parsing Attrs.inc instead of
~560ms. A large part of the cost was from the StringSwitch
instantiations, but this is a good way to avoid similar problems in the
future.

Reviewed By: aaron.ballman, rjmccall

Differential Revision: https://reviews.llvm.org/D76040
clang/utils/TableGen/ClangAttrEmitter.cpp