aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
diff options
context:
space:
mode:
authorYitzhak Mandelbaum <yitzhakm@google.com>2022-12-15 15:11:21 +0000
committerYitzhak Mandelbaum <yitzhakm@google.com>2023-01-12 20:36:37 +0000
commitd34fbf2d9bf4d372d25087d2ded9573b17ce7632 (patch)
tree276bbf0bcf7307491abce2c29633bdd4876f88b0 /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
parent97156ba7bcc91b1449925df95128c36680549a4d (diff)
downloadllvm-d34fbf2d9bf4d372d25087d2ded9573b17ce7632.zip
llvm-d34fbf2d9bf4d372d25087d2ded9573b17ce7632.tar.gz
llvm-d34fbf2d9bf4d372d25087d2ded9573b17ce7632.tar.bz2
[clang][dataflow] In optional model, implement `widen` and make `compare` sound.
This patch includes two related changes: 1. Rewrite `compare` operation to be sound. Current version checks for equality of `isNonEmptyOptional` on both values, judging the values `Same` when the results are equal. While that works when both are true, it is problematic when they are both false, because there are four cases in which that's can occur: both empty, one empty and one unknown (which is two cases), and both unknown. In the latter three cases, it is unsound to judge them `Same`. This patch changes `compare` to explicitly check for case of `both empty` and then judge any other case `Different`. 2. With the change to `compare`, a number of common cases will no longer terminate. So, we also implement widening to properly handle those cases and recover termination. Drive-by: improve performance of `merge` operation. Of the new tests, the code before the patch fails * ReassignValueInLoopToSetUnsafe, and * ReassignValueInLoopToUnknownUnsafe. Differential Revision: https://reviews.llvm.org/D140344
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp')
0 files changed, 0 insertions, 0 deletions