Provide a way to specify inliner's attribute compatibility and merging.
[oota-llvm.git] / include / llvm / IR / Attributes.h
index 3c108861863237bc6cb9c73f0667302c4bb095d5..0e3373165407fa954318c0ba9a69bde46ebe8b7a 100644 (file)
@@ -33,6 +33,7 @@ class AttributeSetImpl;
 class AttributeSetNode;
 class Constant;
 template<typename T> struct DenseMapInfo;
+class Function;
 class LLVMContext;
 class Type;
 
@@ -532,6 +533,13 @@ namespace AttributeFuncs {
 /// \brief Which attributes cannot be applied to a type.
 AttrBuilder typeIncompatible(Type *Ty);
 
+/// \returns Return true if the two functions have compatible target-independent
+/// attributes for inlining purposes.
+bool areInlineCompatible(const Function &Caller, const Function &Callee);
+
+/// \brief Merge caller's and callee's attributes.
+void mergeAttributesForInlining(Function &Caller, const Function &Callee);
+
 } // end AttributeFuncs namespace
 
 } // end llvm namespace