Let callers decide the sub-register index on the def operand of rematerialized instru...
[oota-llvm.git] / include / llvm / Function.h
index ff0b066a5e505fa9dfd04da876e857043a49d5dd..04c1442400e42cfd64e6943aec8a57f1c618f37c 100644 (file)
@@ -27,6 +27,7 @@
 namespace llvm {
 
 class FunctionType;
+class LLVMContext;
 
 // Traits for intrusive list of basic blocks...
 template<> struct ilist_traits<BasicBlock>
@@ -43,7 +44,6 @@ template<> struct ilist_traits<BasicBlock>
   BasicBlock *ensureHead(BasicBlock*) const { return createSentinel(); }
   static void noteHead(BasicBlock*, BasicBlock*) {}
 
-  static iplist<BasicBlock> &getList(Function *F);
   static ValueSymbolTable *getSymTab(Function *ItemParent);
 private:
   mutable ilist_node<BasicBlock> Sentinel;
@@ -61,7 +61,6 @@ template<> struct ilist_traits<Argument>
   Argument *ensureHead(Argument*) const { return createSentinel(); }
   static void noteHead(Argument*, Argument*) {}
 
-  static iplist<Argument> &getList(Function *F);
   static ValueSymbolTable *getSymTab(Function *ItemParent);
 private:
   mutable ilist_node<Argument> Sentinel;
@@ -128,6 +127,10 @@ public:
   const Type *getReturnType() const;           // Return the type of the ret val
   const FunctionType *getFunctionType() const; // Return the FunctionType for me
 
+  /// getContext - Return a pointer to the LLVMContext associated with this 
+  /// function, or NULL if this function is not bound to a context yet.
+  LLVMContext *getContext() const;
+
   /// isVarArg - Return true if this function takes a variable number of
   /// arguments.
   bool isVarArg() const;
@@ -397,6 +400,10 @@ public:
   /// including any contained basic blocks.
   ///
   void dropAllReferences();
+
+  /// hasAddressTaken - returns true if there are any uses of this function
+  /// other than direct calls or invokes to it.
+  bool hasAddressTaken() const;
 };
 
 inline ValueSymbolTable *