aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorGabor Marton <gabor.marton@ericsson.com>2021-05-28 15:18:28 +0200
committerGabor Marton <gabor.marton@ericsson.com>2021-06-14 12:19:09 +0200
commit8ddbb442b6e87efc9c6599280740c6f4fc40963d (patch)
treecb49f14f9e743def4c1aa51ca96968ed11c731bb /llvm/lib/CodeGen/MachineOperand.cpp
parent4629554f0b664c94ada7c44fe40855d7a9a39820 (diff)
downloadllvm-8ddbb442b6e87efc9c6599280740c6f4fc40963d.zip
llvm-8ddbb442b6e87efc9c6599280740c6f4fc40963d.tar.gz
llvm-8ddbb442b6e87efc9c6599280740c6f4fc40963d.tar.bz2
[Analyzer][solver] Simplify existing eq classes and constraints when a new constraint is added
Update `setConstraint` to simplify existing equivalence classes when a new constraint is added. In this patch we iterate over all existing equivalence classes and constraints and try to simplfy them with simplifySVal. This solves problematic cases where we have two symbols in the tree, e.g.: ``` int test_rhs_further_constrained(int x, int y) { if (x + y != 0) return 0; if (y != 0) return 0; clang_analyzer_eval(x + y == 0); // expected-warning{{TRUE}} clang_analyzer_eval(y == 0); // expected-warning{{TRUE}} return 0; } ``` Differential Revision: https://reviews.llvm.org/D103314
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions