This is an archive of the discontinued LLVM Phabricator instance.

Separate the matchers by type and statically dispatch to the right list.
ClosedPublic

Authored by sbenza on Sep 4 2014, 12:04 PM.

Details

Summary

Separate the matchers by type and statically dispatch to the right list.
For any node type that we support, it reduces the number of matchers we
run it through.
For node types we do not support, it makes match() a noop.
This change improves our clang-tidy related benchmark by ~30%.

Diff Detail

Repository
rL LLVM

Event Timeline

sbenza updated this revision to Diff 13279.Sep 4 2014, 12:04 PM
sbenza retitled this revision from to Separate the matchers by type and statically dispatch to the right list..
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 edited edge metadata.Sep 5 2014, 12:32 AM

I assume this makes something faster? Do you have some numbers?

lib/ASTMatchers/ASTMatchFinder.cpp
439 ↗(On Diff #13279)

FIXME:

sbenza updated this revision to Diff 13318.Sep 5 2014, 6:05 AM
sbenza edited edge metadata.

TODO->FIXME

sbenza updated this object.Sep 5 2014, 6:06 AM

Added numbers in the description.

klimek accepted this revision.Sep 5 2014, 7:04 AM
klimek edited edge metadata.

LG. Whooo, nice :)

This revision is now accepted and ready to land.Sep 5 2014, 7:04 AM
sbenza closed this revision.Sep 5 2014, 1:25 PM
sbenza updated this revision to Diff 13338.

Closed by commit rL217274 (authored by @sbenza).