# Changeset View

Changeset View

# Standalone View

Standalone View

# llvm/trunk/include/llvm/Analysis/ScalarEvolution.h

Show First 20 Lines • Show All 1391 Lines • ▼ Show 20 Line(s) | 926 | public: | |||
---|---|---|---|---|---|

1392 | getWrapPredicate(const SCEVAddRecExpr *AR, | 1392 | getWrapPredicate(const SCEVAddRecExpr *AR, | ||

1393 | SCEVWrapPredicate::IncrementWrapFlags AddedFlags); | 1393 | SCEVWrapPredicate::IncrementWrapFlags AddedFlags); | ||

1394 | 1394 | | |||

1395 | /// Re-writes the SCEV according to the Predicates in \p A. | 1395 | /// Re-writes the SCEV according to the Predicates in \p A. | ||

1396 | const SCEV *rewriteUsingPredicate(const SCEV *S, const Loop *L, | 1396 | const SCEV *rewriteUsingPredicate(const SCEV *S, const Loop *L, | ||

1397 | SCEVUnionPredicate &A); | 1397 | SCEVUnionPredicate &A); | ||

1398 | /// Tries to convert the \p S expression to an AddRec expression, | 1398 | /// Tries to convert the \p S expression to an AddRec expression, | ||

1399 | /// adding additional predicates to \p Preds as required. | 1399 | /// adding additional predicates to \p Preds as required. | ||

1400 | const SCEV *convertSCEVToAddRecWithPredicates(const SCEV *S, const Loop *L, | 1400 | const SCEVAddRecExpr * | ||

1401 | convertSCEVToAddRecWithPredicates(const SCEV *S, const Loop *L, | ||||

1401 | SCEVUnionPredicate &Preds); | 1402 | SCEVUnionPredicate &Preds); | ||

1402 | 1403 | | |||

1403 | private: | 1404 | private: | ||

1404 | /// Compute the backedge taken count knowing the interval difference, the | 1405 | /// Compute the backedge taken count knowing the interval difference, the | ||

1405 | /// stride and presence of the equality in the comparison. | 1406 | /// stride and presence of the equality in the comparison. | ||

1406 | const SCEV *computeBECount(const SCEV *Delta, const SCEV *Stride, | 1407 | const SCEV *computeBECount(const SCEV *Delta, const SCEV *Stride, | ||

1407 | bool Equality); | 1408 | bool Equality); | ||

1408 | 1409 | | |||

▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 1487 | public: | |||

1490 | /// SCEV predicate. | 1491 | /// SCEV predicate. | ||

1491 | /// The order of transformations applied on the expression of V returned | 1492 | /// The order of transformations applied on the expression of V returned | ||

1492 | /// by ScalarEvolution is guaranteed to be preserved, even when adding new | 1493 | /// by ScalarEvolution is guaranteed to be preserved, even when adding new | ||

1493 | /// predicates. | 1494 | /// predicates. | ||

1494 | const SCEV *getSCEV(Value *V); | 1495 | const SCEV *getSCEV(Value *V); | ||

1495 | /// \brief Adds a new predicate. | 1496 | /// \brief Adds a new predicate. | ||

1496 | void addPredicate(const SCEVPredicate &Pred); | 1497 | void addPredicate(const SCEVPredicate &Pred); | ||

1497 | /// \brief Attempts to produce an AddRecExpr for V by adding additional | 1498 | /// \brief Attempts to produce an AddRecExpr for V by adding additional | ||

1498 | /// SCEV predicates. | 1499 | /// SCEV predicates. If we can't transform the expression into an | ||

1499 | const SCEV *getAsAddRec(Value *V); | 1500 | /// AddRecExpr we return nullptr and not add additional SCEV predicates | ||

1501 | /// to the current context. | ||||

1502 | const SCEVAddRecExpr *getAsAddRec(Value *V); | ||||

1500 | /// \brief Proves that V doesn't overflow by adding SCEV predicate. | 1503 | /// \brief Proves that V doesn't overflow by adding SCEV predicate. | ||

1501 | void setNoOverflow(Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags); | 1504 | void setNoOverflow(Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags); | ||

1502 | /// \brief Returns true if we've proved that V doesn't wrap by means of a | 1505 | /// \brief Returns true if we've proved that V doesn't wrap by means of a | ||

1503 | /// SCEV predicate. | 1506 | /// SCEV predicate. | ||

1504 | bool hasNoOverflow(Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags); | 1507 | bool hasNoOverflow(Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags); | ||

1505 | /// \brief Returns the ScalarEvolution analysis used. | 1508 | /// \brief Returns the ScalarEvolution analysis used. | ||

1506 | ScalarEvolution *getSE() const { return &SE; } | 1509 | ScalarEvolution *getSE() const { return &SE; } | ||

1507 | /// We need to explicitly define the copy constructor because of FlagsMap. | 1510 | /// We need to explicitly define the copy constructor because of FlagsMap. | ||

Show All 32 Lines |