This is an archive of the discontinued LLVM Phabricator instance.

Make the function pointer a template argument instead of a runtime value.
ClosedPublic

Authored by sbenza on Nov 26 2014, 11:56 AM.

Details

Summary

Speed up the variadic matchers by removing one indirect call.
Making the function pointer a template arguments allows the compiler to
inline the call instead of doing an runtime call by pointer.
Also, optimize the allOf() case to avoid redundant kind checks.
This speeds up our clang-tidy benchmark by ~2%

Diff Detail

Event Timeline

sbenza updated this revision to Diff 16661.Nov 26 2014, 11:56 AM
sbenza retitled this revision from to Make the function pointer a template argument instead of a runtime value..
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 1 2014, 2:32 AM
klimek edited edge metadata.

lg. sorry for the delay.

This revision is now accepted and ready to land.Dec 1 2014, 2:32 AM
sbenza closed this revision.Dec 1 2014, 6:46 AM
sbenza updated this revision to Diff 16764.

Closed by commit rL223029 (authored by @sbenza).