summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAdam Balogh <adam.balogh@ericsson.com>2019-03-28 13:05:59 +0000
committerAdam Balogh <adam.balogh@ericsson.com>2019-03-28 13:05:59 +0000
commita19c985f8ab0766fd951b624337f955211c69b8b (patch)
tree453f24aa6c1db892de239e78da809b06a7d3d688 /llvm/lib
parent12632c761be53a18efd00696b7c30f3bbbf05ea3 (diff)
downloadbcm5719-llvm-a19c985f8ab0766fd951b624337f955211c69b8b.tar.gz
bcm5719-llvm-a19c985f8ab0766fd951b624337f955211c69b8b.zip
[Analyzer] Constraint Manager - Calculate Effective Range for Differences
Since rL335814, if the constraint manager cannot find a range set for `A - B` (where `A` and `B` are symbols) it looks for a range for `B - A` and returns it negated if it exists. However, if a range set for both `A - B` and `B - A` is stored then it only returns the first one. If we both use `A - B` and `B - A`, these expressions behave as two totally unrelated symbols. This way we miss some useful deductions which may lead to false negatives or false positives. This tiny patch changes this behavior: if the symbolic expression the constraint manager is looking for is a difference `A - B`, it tries to retrieve the range for both `A - B` and `B - A` and if both exists it returns the intersection of range `A - B` and the negated range of `B - A`. This way every time a checker applies new constraints to the symbolic difference or to its negated it always affects both the original difference and its negated. Differential Revision: https://reviews.llvm.org/D55007 llvm-svn: 357167
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud