Add initial support for the convergent attribute.
[oota-llvm.git] / include / llvm / IR / Function.h
index 73f22b129ad039fea414d7eb7dcca15cedf062c8..6c228eae633a522f0f3fc0389cc195a5a3675eee 100644 (file)
@@ -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 {