This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Faster hashing of subsequences in CompoundStmts.
ClosedPublic

Authored by teemperor on Jun 19 2017, 2:03 PM.

Details

Summary

This patches improves the hashing subsequences in CompoundStmts by incrementally hashing all subsequences with the same starting position. This results in a reduction of the time for this constraint while running over SQLite from 1.10 seconds to 0.55 seconds (-50%).

Diff Detail

Event Timeline

teemperor created this revision.Jun 19 2017, 2:03 PM
NoQ accepted this revision.Jul 2 2017, 12:57 AM

This looks negligible compared to compilation time.
I wonder if we're now scalable enough to try finding whole-translation-unit clones.

lib/Analysis/CloneDetection.cpp
402

Hmm, is 8 enough here? People often write large functions. Maybe bump to 32 or 64?

This revision is now accepted and ready to land.Jul 2 2017, 12:57 AM
teemperor closed this revision.Jul 9 2017, 1:41 PM