[PATCH] D153584: [dataflow] Make SAT solver deterministic
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 23 14:52:46 PDT 2023
sammccall added a comment.
In D153584#4443796 <https://reviews.llvm.org/D153584#4443796>, @xazax.hun wrote:
> Is there a measurable perf cost for this determinism?
I'm going to say no...
All the extra cost is paid in addTransitiveFlowConditionConstraints. (We were building a set, now we're building a set + vector. The sat solver is actually doing *less* work now). I can't measure any difference in that function's runtime, and it's cheap enough to be trivial anyway.
On all of `ClangAnalysisFlowSensitiveTests` (release+asserts), with this patch:
- total time is 7.5s
- clang parsing is 6.1s (81%)
- sat solving in DataflowAnalysisContext is 75ms (1.0%)
- addTransitiveFlowConditionConstraints is 2.5ms (0.033%)
even if 100% of addTransitiveFlowConditionConstraints was added by this patch, it's still negligible compared to actual sat solving. These are toy examples, but sat solving scales worse almost by definition.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153584/new/
https://reviews.llvm.org/D153584
More information about the cfe-commits
mailing list