# Changeset View

Changeset View

# Standalone View

Standalone View

# llvm/trunk/include/llvm/Transforms/Utils/LoopUtils.h

Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Line(s) | 260 | public: | |||
---|---|---|---|---|---|

262 | InductionDescriptor() = default; | 262 | InductionDescriptor() = default; | ||

263 | 263 | | |||

264 | /// Get the consecutive direction. Returns: | 264 | /// Get the consecutive direction. Returns: | ||

265 | /// 0 - unknown or non-consecutive. | 265 | /// 0 - unknown or non-consecutive. | ||

266 | /// 1 - consecutive and increasing. | 266 | /// 1 - consecutive and increasing. | ||

267 | /// -1 - consecutive and decreasing. | 267 | /// -1 - consecutive and decreasing. | ||

268 | int getConsecutiveDirection() const; | 268 | int getConsecutiveDirection() const; | ||

269 | 269 | | |||

270 | /// Compute the transformed value of Index at offset StartValue using step | | |||

271 | /// StepValue. | | |||

272 | /// For integer induction, returns StartValue + Index * StepValue. | | |||

273 | /// For pointer induction, returns StartValue[Index * StepValue]. | | |||

274 | /// FIXME: The newly created binary instructions should contain nsw/nuw | | |||

275 | /// flags, which can be found from the original scalar operations. | | |||

276 | Value *transform(IRBuilder<> &B, Value *Index, ScalarEvolution *SE, | | |||

277 | const DataLayout& DL) const; | | |||

278 | | ||||

279 | Value *getStartValue() const { return StartValue; } | 270 | Value *getStartValue() const { return StartValue; } | ||

280 | InductionKind getKind() const { return IK; } | 271 | InductionKind getKind() const { return IK; } | ||

281 | const SCEV *getStep() const { return Step; } | 272 | const SCEV *getStep() const { return Step; } | ||

273 | BinaryOperator *getInductionBinOp() const { return InductionBinOp; } | ||||

282 | ConstantInt *getConstIntStepValue() const; | 274 | ConstantInt *getConstIntStepValue() const; | ||

283 | 275 | | |||

284 | /// Returns true if \p Phi is an induction in the loop \p L. If \p Phi is an | 276 | /// Returns true if \p Phi is an induction in the loop \p L. If \p Phi is an | ||

285 | /// induction, the induction descriptor \p D will contain the data describing | 277 | /// induction, the induction descriptor \p D will contain the data describing | ||

286 | /// this induction. If by some other means the caller has a better SCEV | 278 | /// this induction. If by some other means the caller has a better SCEV | ||

287 | /// expression for \p Phi than the one returned by the ScalarEvolution | 279 | /// expression for \p Phi than the one returned by the ScalarEvolution | ||

288 | /// analysis, it can be passed through \p Expr. If the def-use chain | 280 | /// analysis, it can be passed through \p Expr. If the def-use chain | ||

289 | /// associated with the phi includes casts (that we know we can ignore | 281 | /// associated with the phi includes casts (that we know we can ignore | ||

▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines |