Avoid many std::tie/tuple instantiations in ASTImporter

To factor the error checking, use importChecked instead of importSeq.
This avoids repeating the names of all of the imported child nodes once,
and allows errors to be checked with a single conditional as it is with
importSeq.

After:
  peak memory: 601.63MB
  real: 0m19.172s
  obj size: 8,352kb

Before:
  peak memory: 954.11MB
  real: 0m26.188s
  obj size: 10,000kb

The speed is not as impressive as I hoped, but the memory use reduction
is impressive, and seems worth it.

Reviewed By: martong, shafik

Differential Revision: https://reviews.llvm.org/D73675
This commit is contained in:
Reid Kleckner 2020-02-04 15:22:15 -08:00
parent c67773bebe
commit 1091730f5f
1 changed files with 756 additions and 972 deletions

File diff suppressed because it is too large Load Diff