[llvm-commits] [llvm] r55638 - /llvm/trunk/include/llvm/Function.h

Devang Patel dpatel at apple.com
Tue Sep 2 11:33:55 PDT 2008


Author: dpatel
Date: Tue Sep  2 13:33:55 2008
New Revision: 55638

URL: http://llvm.org/viewvc/llvm-project?rev=55638&view=rev
Log:
Getter and setter for function notes.

Modified:
    llvm/trunk/include/llvm/Function.h

Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=55638&r1=55637&r2=55638&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Tue Sep  2 13:33:55 2008
@@ -51,6 +51,12 @@
   static int getListOffset();
 };
 
+typedef unsigned FunctionNotes;
+const FunctionNotes FP_None            = 0;   
+const FunctionNotes FP_NoInline        = 1<<0;
+const FunctionNotes FP_AlwaysInline    = 1<<1;
+const FunctionNotes FP_OptimizeForSize = 1<<2;
+
 class Function : public GlobalValue, public Annotable,
                  public ilist_node<Function> {
 public:
@@ -70,7 +76,8 @@
   mutable ArgumentListType ArgumentList;  ///< The formal arguments
   ValueSymbolTable *SymTab;               ///< Symbol table of args/instructions
   PAListPtr ParamAttrs;                   ///< Parameter attributes
-  
+  FunctionNotes Notes;                    ///< Function properties
+
   // The Calling Convention is stored in Value::SubclassData.
   /*unsigned CallingConvention;*/
 
@@ -148,6 +155,14 @@
   ///
   void setParamAttrs(const PAListPtr &attrs) { ParamAttrs = attrs; }
 
+  /// getNotes - Return this function properties
+  ///
+  const FunctionNotes &getNotes() const { return Notes; }
+
+  /// setNotes - Set properties for this function
+  ///
+  void setNotes(const FunctionNotes P) { Notes = P;}
+
   /// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm
   ///                             to use during code generation.
   bool hasGC() const;





More information about the llvm-commits mailing list