This is an archive of the discontinued LLVM Phabricator instance.

Fix isInstantiated and isInTemplateInstantiation to not recreate the matchers on each call.
ClosedPublic

Authored by sbenza on Dec 8 2014, 9:07 AM.

Details

Summary

Store the result matcher after the first call and reuse it later on.
Recreating the matchers just to use them once incurs in a lot of
unnecessary temporary memory allocations.
This change speeds up our clang-tidy benchmarks by ~2%.

Diff Detail

Repository
rL LLVM

Event Timeline

sbenza updated this revision to Diff 17039.Dec 8 2014, 9:07 AM
sbenza retitled this revision from to Fix isInstantiated and isInTemplateInstantiation to not recreate the matchers on each call..
sbenza updated this object.
sbenza edited the test plan for this revision. (Show Details)
sbenza added a reviewer: klimek.
sbenza added a subscriber: Unknown Object (MLST).
klimek accepted this revision.Dec 8 2014, 9:16 AM
klimek edited edge metadata.

lg

This revision is now accepted and ready to land.Dec 8 2014, 9:16 AM
sbenza closed this revision.Dec 8 2014, 12:18 PM
sbenza updated this revision to Diff 17050.

Closed by commit rL223690 (authored by @sbenza).