diff options
Diffstat (limited to 'lib/CodeGen/CGLoopInfo.h')
-rw-r--r-- | lib/CodeGen/CGLoopInfo.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/CodeGen/CGLoopInfo.h b/lib/CodeGen/CGLoopInfo.h index 466fdc9fed..84ba03bfb0 100644 --- a/lib/CodeGen/CGLoopInfo.h +++ b/lib/CodeGen/CGLoopInfo.h @@ -66,6 +66,12 @@ struct LoopAttributes { /// Value for llvm.loop.distribute.enable metadata. LVEnableState DistributeEnable; + + /// Value for llvm.loop.pipeline.disable metadata. + bool PipelineDisabled; + + /// Value for llvm.loop.pipeline.iicount metadata. + unsigned PipelineInitiationInterval; }; /// Information used when generating a structured loop. @@ -84,6 +90,9 @@ public: /// Get the set of attributes active for this loop. const LoopAttributes &getAttributes() const { return Attrs; } + /// Return this loop's access group or nullptr if it does not have one. + llvm::MDNode *getAccessGroup() const { return AccGroup; } + private: /// Loop ID metadata. llvm::MDNode *LoopID; @@ -91,6 +100,8 @@ private: llvm::BasicBlock *Header; /// The attributes for this loop. LoopAttributes Attrs; + /// The access group for memory accesses parallel to this loop. + llvm::MDNode *AccGroup = nullptr; }; /// A stack of loop information corresponding to loop nesting levels. @@ -166,6 +177,14 @@ public: /// \brief Set the unroll count for the next loop pushed. void setUnrollAndJamCount(unsigned C) { StagedAttrs.UnrollAndJamCount = C; } + /// Set the pipeline disabled state. + void setPipelineDisabled(bool S) { StagedAttrs.PipelineDisabled = S; } + + /// Set the pipeline initiation interval. + void setPipelineInitiationInterval(unsigned C) { + StagedAttrs.PipelineInitiationInterval = C; + } + private: /// Returns true if there is LoopInfo on the stack. bool hasInfo() const { return !Active.empty(); } |