Provide a way to specify inliner's attribute compatibility and merging
[oota-llvm.git] / include / llvm / IR / Attributes.h
index 52a9ca83013bbd1b63d8719dac13fe58d68d7c3b..1bb43933aa38cd0414bad3ac61b6cb57c02b0cb4 100644 (file)
@@ -33,6 +33,7 @@ class AttributeSetImpl;
 class AttributeSetNode;
 class Constant;
 template<typename T> struct DenseMapInfo;
+class Function;
 class LLVMContext;
 class Type;
 
@@ -527,6 +528,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