summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGLoopInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGLoopInfo.h')
-rw-r--r--clang/lib/CodeGen/CGLoopInfo.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGLoopInfo.h b/clang/lib/CodeGen/CGLoopInfo.h
index 686a218c763..ec3390677fa 100644
--- a/clang/lib/CodeGen/CGLoopInfo.h
+++ b/clang/lib/CodeGen/CGLoopInfo.h
@@ -41,12 +41,12 @@ struct LoopAttributes {
bool IsParallel;
/// \brief State of loop vectorization or unrolling.
- enum LVEnableState { Unspecified, Enable, Disable };
+ enum LVEnableState { Unspecified, Enable, Disable, Full };
/// \brief Value for llvm.loop.vectorize.enable metadata.
LVEnableState VectorizeEnable;
- /// \brief Selects no metadata, llvm.unroll.full, or llvm.unroll.disable.
+ /// \brief Value for llvm.loop.unroll.* metadata (enable, disable, or full).
LVEnableState UnrollEnable;
/// \brief Value for llvm.loop.vectorize.width metadata.
@@ -127,9 +127,8 @@ public:
}
/// \brief Set the next pushed loop unroll state.
- void setUnrollEnable(bool Enable = true) {
- StagedAttrs.UnrollEnable =
- Enable ? LoopAttributes::Enable : LoopAttributes::Disable;
+ void setUnrollState(const LoopAttributes::LVEnableState &State) {
+ StagedAttrs.UnrollEnable = State;
}
/// \brief Set the vectorize width for the next loop pushed.
OpenPOWER on IntegriCloud