mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-08 03:26:34 +00:00
[IR] Add {is,set,setNot}Convergent() functions to CallSite, CallInstr, and InvokeInstr.
Summary: (CallSite already has isConvergent() and setConvergent().) No functional changes. Reviewers: reames Subscribers: llvm-commits, jingyue, arsenm Differential Revision: http://reviews.llvm.org/D17316 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
97a9fd0f0b
commit
7d0a344458
@ -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());
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user