diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/IR/CallSite.h | 11 | ||||
| -rw-r--r-- | llvm/include/llvm/IR/Instructions.h | 14 | 
2 files changed, 25 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/CallSite.h b/llvm/include/llvm/IR/CallSite.h index f7bfb47a5b4..55bd713384e 100644 --- a/llvm/include/llvm/IR/CallSite.h +++ b/llvm/include/llvm/IR/CallSite.h @@ -410,6 +410,17 @@ public:      CALLSITE_DELEGATE_SETTER(setDoesNotThrow());    } +  /// @brief Determine if the call is convergent. +  bool isConvergent() const { +    CALLSITE_DELEGATE_GETTER(isConvergent()); +  } +  void setConvergent() { +    CALLSITE_DELEGATE_SETTER(setConvergent()); +  } +  void setNotConvergent() { +    CALLSITE_DELEGATE_SETTER(setNotConvergent()); +  } +    unsigned getNumOperandBundles() const {      CALLSITE_DELEGATE_GETTER(getNumOperandBundles());    } diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index efacf197acf..5a32b7bdec5 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -1745,6 +1745,10 @@ public:    void setConvergent() {      addAttribute(AttributeSet::FunctionIndex, Attribute::Convergent);    } +  void setNotConvergent() { +    removeAttribute(AttributeSet::FunctionIndex, +                    Attribute::get(getContext(), Attribute::Convergent)); +  }    /// \brief Determine if the call returns a structure through first    /// pointer argument. @@ -3664,6 +3668,16 @@ public:      addAttribute(AttributeSet::FunctionIndex, Attribute::NoDuplicate);    } +  /// \brief Determine if the invoke is convergent +  bool isConvergent() const { return hasFnAttr(Attribute::Convergent); } +  void setConvergent() { +    addAttribute(AttributeSet::FunctionIndex, Attribute::Convergent); +  } +  void setNotConvergent() { +    removeAttribute(AttributeSet::FunctionIndex, +                    Attribute::get(getContext(), Attribute::Convergent)); +  } +    /// \brief Determine if the call returns a structure through first    /// pointer argument.    bool hasStructRetAttr() const {  | 

