Achieves almost a 200% speedup on the example where the performance of visitors was problematic.
Performance on sqlite3 is unaffected.
rdar://38818362
Paths
| Differential D45113
[analyzer] Cache computation of regionAsOffset ClosedPublic Authored by george.karpenkov on Mar 30 2018, 3:44 PM.
Details Summary Achieves almost a 200% speedup on the example where the performance of visitors was problematic. Performance on sqlite3 is unaffected. rdar://38818362
Diff Detail
Event TimelineHerald added subscribers: a.sidorin, szepet, xazax.hun. · View Herald TranscriptMar 30 2018, 3:44 PM Comment Actions The huge switch in getAsOffset() does really nothing good compared to a virtual function. I suspect that this alone could have made it faster, depending on how the switch is compiled. And with a virtual function, we could also easily add the new field and the lookup only to those 3-4 regions that aren't base regions - which might as well be faster. But this already looks good, we should have tried this earlier! This revision is now accepted and ready to land.Mar 30 2018, 6:07 PM Closed by commit rC328911: [analyzer] Cache offset computation for MemRegion (authored by george.karpenkov). · Explain WhyMar 30 2018, 6:23 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 140518 include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lib/StaticAnalyzer/Core/MemRegion.cpp
|