This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Improve simplifySVal performance further.
ClosedPublic

Authored by NoQ on May 25 2018, 5:35 PM.

Details

Summary

Memoize SValBuilder::simplifySVal() so that it didn't try to re-simplify the same symbolic expression in the same program state.

Speeds up the analysis by ~25% on the artificial test in test/Analysis/hangs.c.

The test is still exponentially exploding though.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ created this revision.May 25 2018, 5:35 PM
NoQ edited the summary of this revision. (Show Details)May 25 2018, 5:39 PM

@NoQ we should make sure the memory is not exploding and that we don't make the analyzer slower in other cases. Though we could commit this, and then let CI figure out potential regressions.

NoQ added a comment.May 25 2018, 6:25 PM

The remaining slowness is in removeDead(). It's going to be fun to optimize. Some parts of it are already memoized (eg. the live set in SymbolReaper).

Memory usage on the artificial test seems stable.

This revision is now accepted and ready to land.May 29 2018, 10:36 AM
This revision was automatically updated to reflect the committed changes.