X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FIR%2FFunction.h;h=6c228eae633a522f0f3fc0389cc195a5a3675eee;hp=73f22b129ad039fea414d7eb7dcca15cedf062c8;hb=13146c7e3b143f021e3e58a7bdb642e43f8e7b57;hpb=1c74d4768af8a17e46768662d5551a7553a49747 diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h index 73f22b129ad..6c228eae633 100644 --- a/include/llvm/IR/Function.h +++ b/include/llvm/IR/Function.h @@ -308,6 +308,16 @@ public: addFnAttr(Attribute::NoDuplicate); } + /// @brief Determine if the call is convergent. + bool isConvergent() const { + return AttributeSets.hasAttribute(AttributeSet::FunctionIndex, + Attribute::Convergent); + } + void setConvergent() { + addFnAttr(Attribute::Convergent); + } + + /// @brief True if the ABI mandates (or the user requested) that this /// function be in a unwind table. bool hasUWTable() const {