diff options
| author | Sam McCall <sam.mccall@gmail.com> | 2023-07-11 12:48:30 +0200 |
|---|---|---|
| committer | Sam McCall <sam.mccall@gmail.com> | 2023-07-12 08:09:10 +0200 |
| commit | 7d935d083659c9ddaf3389c1747fc8c59f07e3fc (patch) | |
| tree | 9f805bcef1f93ab15da1e69439aeb3c53bc6b199 /lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp | |
| parent | 304e97469455b57f6496f68fef569eeaed3a2cd8 (diff) | |
| download | llvm-7d935d083659c9ddaf3389c1747fc8c59f07e3fc.zip llvm-7d935d083659c9ddaf3389c1747fc8c59f07e3fc.tar.gz llvm-7d935d083659c9ddaf3389c1747fc8c59f07e3fc.tar.bz2 | |
[dataflow] improve determinism of generated SAT system
Fixes two places where we relied on map iteration order when processing
values, which leaked nondeterminism into the generated SAT formulas.
Adds a couple of tests that directly assert that the SAT system is
equivalent on each run.
It's desirable that the formulas are deterministic based on the input:
- our SAT solver is naive and perfermance is sensitive to even simple
semantics-preserving transformations like A|B to B|A.
(e.g. it's likely to choose a different variable to split on).
Timeout failures are bad, but *flaky* ones are terrible to debug.
- similarly when debugging, it's important to have a consistent
understanding of what e.g. "V23" means across runs.
---
Both changes in this patch were isolated from a nullability analysis of
real-world code which was extremely slow, spending ages in the SAT
solver at "random" points that varied on each run.
I've included a reduced version of the code as a regression test.
One of the changes shows up directly as flow-condition nondeterminism
with a no-op analysis, the other relied on bits of the nullability
analysis but I found a synthetic example to show the problem.
Differential Revision: https://reviews.llvm.org/D154948
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp')
0 files changed, 0 insertions, 0 deletions
