diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 14:02:54 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 14:02:54 +0000 | 
| commit | d5ea6fa648f8835a44adfb322b788e615d77cb71 (patch) | |
| tree | 570aa90958a58b9d6a71fa8594ee0ad8d2a18f2c /contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h | |
| parent | d9484dd61cc151c4f34c31e07f693fefa66316b5 (diff) | |
| parent | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h')
| -rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h | 33 | 
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h b/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h index 9d5f23ff9a2a..84ba03bfb00b 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h +++ b/contrib/llvm/tools/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,8 +61,17 @@ struct LoopAttributes {    /// llvm.unroll.    unsigned UnrollCount; +  /// llvm.unroll. +  unsigned UnrollAndJamCount; +    /// 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. @@ -78,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; @@ -85,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. @@ -143,6 +160,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 +174,17 @@ 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; } + +  /// 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(); }  | 
