This is an archive of the discontinued LLVM Phabricator instance.

[AST] Various micro-optimizations in CXXInheritance
ClosedPublic

Authored by bricci on Jul 13 2018, 9:26 AM.

Details

Summary
  1. Pack std::pair<bool, unsigned> in CXXBasePaths::ClassSubobjects.
  2. Use a SmallPtrSet instead of a SmallDenseSet for CXXBasePaths::VisitedDependentRecords.
  3. Reorder some members of CXXBasePaths to save 8 bytes.
  4. Use a SmallSetVector instead of a SetVector in CXXBasePaths::ComputeDeclsFound to avoid some allocations.

This speeds up an -fsyntax-only on all of Boost by approx 0.15%,
mainly by speeding up CXXBasePaths::lookupInBases by
approx 10%. No functional changes.

Diff Detail

Repository
rC Clang

Event Timeline

bricci created this revision.Jul 13 2018, 9:26 AM
bkramer accepted this revision.Jul 18 2018, 7:55 AM

cool

This revision is now accepted and ready to land.Jul 18 2018, 7:55 AM

@bkramer Thanks for the review! Can you commit it for my since I can not do it myself?

This revision was automatically updated to reflect the committed changes.