diff options
Diffstat (limited to 'clang/lib/CodeGen/CGLoopInfo.h')
-rw-r--r-- | clang/lib/CodeGen/CGLoopInfo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGLoopInfo.h b/clang/lib/CodeGen/CGLoopInfo.h index 9d5f23ff9a2..466fdc9fedd 100644 --- a/clang/lib/CodeGen/CGLoopInfo.h +++ b/clang/lib/CodeGen/CGLoopInfo.h @@ -49,6 +49,9 @@ struct LoopAttributes { /// Value for llvm.loop.unroll.* metadata (enable, disable, or full). LVEnableState UnrollEnable; + /// Value for llvm.loop.unroll_and_jam.* metadata (enable, disable, or full). + LVEnableState UnrollAndJamEnable; + /// Value for llvm.loop.vectorize.width metadata. unsigned VectorizeWidth; @@ -58,6 +61,9 @@ struct LoopAttributes { /// llvm.unroll. unsigned UnrollCount; + /// llvm.unroll. + unsigned UnrollAndJamCount; + /// Value for llvm.loop.distribute.enable metadata. LVEnableState DistributeEnable; }; @@ -143,6 +149,11 @@ public: StagedAttrs.UnrollEnable = State; } + /// Set the next pushed loop unroll_and_jam state. + void setUnrollAndJamState(const LoopAttributes::LVEnableState &State) { + StagedAttrs.UnrollAndJamEnable = State; + } + /// Set the vectorize width for the next loop pushed. void setVectorizeWidth(unsigned W) { StagedAttrs.VectorizeWidth = W; } @@ -152,6 +163,9 @@ public: /// Set the unroll count for the next loop pushed. void setUnrollCount(unsigned C) { StagedAttrs.UnrollCount = C; } + /// \brief Set the unroll count for the next loop pushed. + void setUnrollAndJamCount(unsigned C) { StagedAttrs.UnrollAndJamCount = C; } + private: /// Returns true if there is LoopInfo on the stack. bool hasInfo() const { return !Active.empty(); } |