@@ -1563,7 +1563,6 @@ private QlBuiltins::BigInt getGuardedUpperBound(VariableAccess guardedAccess) {
1563
1563
)
1564
1564
}
1565
1565
1566
- cached
1567
1566
private module SimpleRangeAnalysisCached {
1568
1567
/**
1569
1568
* Gets the lower bound of the expression.
@@ -1577,7 +1576,6 @@ private module SimpleRangeAnalysisCached {
1577
1576
*
1578
1577
* `lowerBound(expr.getFullyConverted())`
1579
1578
*/
1580
- cached
1581
1579
QlBuiltins:: BigInt lowerBound ( Expr expr ) {
1582
1580
// Combine the lower bounds returned by getTruncatedLowerBounds into a
1583
1581
// single minimum value.
@@ -1596,15 +1594,13 @@ private module SimpleRangeAnalysisCached {
1596
1594
*
1597
1595
* `upperBound(expr.getFullyConverted())`
1598
1596
*/
1599
- cached
1600
1597
QlBuiltins:: BigInt upperBound ( Expr expr ) {
1601
1598
// Combine the upper bounds returned by getTruncatedUpperBounds and
1602
1599
// getGuardedUpperBound into a single maximum value
1603
1600
result = min ( [ max ( getTruncatedUpperBounds ( expr ) ) , getGuardedUpperBound ( expr ) ] )
1604
1601
}
1605
1602
1606
1603
/** Holds if the upper bound of `expr` may have been widened. This means the upper bound is in practice likely to be overly wide. */
1607
- cached
1608
1604
predicate upperBoundMayBeWidened ( Expr e ) {
1609
1605
isRecursiveExpr ( e ) and
1610
1606
// Widening is not a problem if the post-analysis in `getGuardedUpperBound` has overridden the widening.
@@ -1627,7 +1623,6 @@ private module SimpleRangeAnalysisCached {
1627
1623
* }
1628
1624
* }
1629
1625
*/
1630
- cached
1631
1626
predicate exprWithEmptyRange ( Expr expr ) {
1632
1627
analyzableExpr ( expr ) and
1633
1628
(
@@ -1638,13 +1633,11 @@ private module SimpleRangeAnalysisCached {
1638
1633
}
1639
1634
1640
1635
/** Holds if the definition might overflow negatively. */
1641
- cached
1642
1636
predicate defMightOverflowNegatively ( RangeSsaDefinition def , StackVariable v ) {
1643
1637
getDefLowerBoundsImpl ( def , v ) < varMinVal ( v )
1644
1638
}
1645
1639
1646
1640
/** Holds if the definition might overflow positively. */
1647
- cached
1648
1641
predicate defMightOverflowPositively ( RangeSsaDefinition def , StackVariable v ) {
1649
1642
getDefUpperBoundsImpl ( def , v ) > varMaxVal ( v )
1650
1643
}
@@ -1653,7 +1646,6 @@ private module SimpleRangeAnalysisCached {
1653
1646
* Holds if the definition might overflow (either positively or
1654
1647
* negatively).
1655
1648
*/
1656
- cached
1657
1649
predicate defMightOverflow ( RangeSsaDefinition def , StackVariable v ) {
1658
1650
defMightOverflowNegatively ( def , v ) or
1659
1651
defMightOverflowPositively ( def , v )
@@ -1678,7 +1670,6 @@ private module SimpleRangeAnalysisCached {
1678
1670
* does not consider the possibility that the expression might overflow
1679
1671
* due to a conversion.
1680
1672
*/
1681
- cached
1682
1673
predicate exprMightOverflowNegatively ( Expr expr ) {
1683
1674
getLowerBoundsImpl ( expr ) < exprMinVal ( expr )
1684
1675
or
@@ -1699,7 +1690,6 @@ private module SimpleRangeAnalysisCached {
1699
1690
* `(int16)(x+y)` might overflow due to the `(int16)` cast, rather than
1700
1691
* due to the addition.
1701
1692
*/
1702
- cached
1703
1693
predicate convertedExprMightOverflowNegatively ( Expr expr ) {
1704
1694
exprMightOverflowNegatively ( expr ) or
1705
1695
convertedExprMightOverflowNegatively ( expr .getConversion ( ) )
@@ -1710,7 +1700,6 @@ private module SimpleRangeAnalysisCached {
1710
1700
* does not consider the possibility that the expression might overflow
1711
1701
* due to a conversion.
1712
1702
*/
1713
- cached
1714
1703
predicate exprMightOverflowPositively ( Expr expr ) {
1715
1704
getUpperBoundsImpl ( expr ) > exprMaxVal ( expr )
1716
1705
or
@@ -1731,7 +1720,6 @@ private module SimpleRangeAnalysisCached {
1731
1720
* `(int16)(x+y)` might overflow due to the `(int16)` cast, rather than
1732
1721
* due to the addition.
1733
1722
*/
1734
- cached
1735
1723
predicate convertedExprMightOverflowPositively ( Expr expr ) {
1736
1724
exprMightOverflowPositively ( expr ) or
1737
1725
convertedExprMightOverflowPositively ( expr .getConversion ( ) )
@@ -1742,7 +1730,6 @@ private module SimpleRangeAnalysisCached {
1742
1730
* negatively). The possibility that the expression might overflow
1743
1731
* due to an implicit or explicit cast is also considered.
1744
1732
*/
1745
- cached
1746
1733
predicate convertedExprMightOverflow ( Expr expr ) {
1747
1734
convertedExprMightOverflowNegatively ( expr ) or
1748
1735
convertedExprMightOverflowPositively ( expr )
0 commit comments