Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/CodeGen/CGLoopInfo.h
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | struct LoopAttributes { | ||||
LVEnableState VectorizePredicateEnable; | LVEnableState VectorizePredicateEnable; | ||||
/// Value for llvm.loop.vectorize.width metadata. | /// Value for llvm.loop.vectorize.width metadata. | ||||
unsigned VectorizeWidth; | unsigned VectorizeWidth; | ||||
// Value for llvm.loop.vectorize.scalable.enable | // Value for llvm.loop.vectorize.scalable.enable | ||||
LVEnableState VectorizeScalable; | LVEnableState VectorizeScalable; | ||||
/// Value for llvm.loop.interleave.enable metadata. | |||||
LVEnableState InterleaveEnable; | |||||
/// Value for llvm.loop.interleave.count metadata. | /// Value for llvm.loop.interleave.count metadata. | ||||
unsigned InterleaveCount; | unsigned InterleaveCount; | ||||
/// llvm.unroll. | /// llvm.unroll. | ||||
unsigned UnrollCount; | unsigned UnrollCount; | ||||
/// llvm.unroll. | /// llvm.unroll. | ||||
unsigned UnrollAndJamCount; | unsigned UnrollAndJamCount; | ||||
▲ Show 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | public: | ||||
/// Set the vectorize width for the next loop pushed. | /// Set the vectorize width for the next loop pushed. | ||||
void setVectorizeWidth(unsigned W) { StagedAttrs.VectorizeWidth = W; } | void setVectorizeWidth(unsigned W) { StagedAttrs.VectorizeWidth = W; } | ||||
void setVectorizeScalable(const LoopAttributes::LVEnableState &State) { | void setVectorizeScalable(const LoopAttributes::LVEnableState &State) { | ||||
StagedAttrs.VectorizeScalable = State; | StagedAttrs.VectorizeScalable = State; | ||||
} | } | ||||
void setInterleaveEnable(bool Enable = true) { | |||||
StagedAttrs.InterleaveEnable = | |||||
Enable ? LoopAttributes::Enable : LoopAttributes::Disable; | |||||
} | |||||
/// Set the interleave count for the next loop pushed. | /// Set the interleave count for the next loop pushed. | ||||
void setInterleaveCount(unsigned C) { StagedAttrs.InterleaveCount = C; } | void setInterleaveCount(unsigned C) { StagedAttrs.InterleaveCount = C; } | ||||
/// Set the unroll count for the next loop pushed. | /// Set the unroll count for the next loop pushed. | ||||
void setUnrollCount(unsigned C) { StagedAttrs.UnrollCount = C; } | void setUnrollCount(unsigned C) { StagedAttrs.UnrollCount = C; } | ||||
/// \brief Set the unroll count for the next loop pushed. | /// \brief Set the unroll count for the next loop pushed. | ||||
void setUnrollAndJamCount(unsigned C) { StagedAttrs.UnrollAndJamCount = C; } | void setUnrollAndJamCount(unsigned C) { StagedAttrs.UnrollAndJamCount = C; } | ||||
Show All 28 Lines |