Added LLVM copyright header.
[oota-llvm.git] / lib / Target / SparcV9 / RegAlloc / PhyRegAlloc.h
index 438f2c56a91a5fd58458da197fcff51478b5bc7b..7ab638f1c679042d569800e3f35c4c7d988a92f5 100644 (file)
@@ -1,4 +1,11 @@
 //===-- PhyRegAlloc.h - Graph Coloring Register Allocator -------*- c++ -*-===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
 //   
 // This is the main entry point for register allocation.
 //
@@ -29,6 +36,7 @@ class FunctionLiveVarInfo;
 class MachineInstr;
 class LoopInfo;
 class RegClass;
+class Constant;
 
 //----------------------------------------------------------------------------
 // Class AddedInstrns:
@@ -77,6 +85,8 @@ class PhyRegAlloc : public FunctionPass {
   AddedInstrns AddedInstrAtEntry;       // to store instrns added at entry
   const LoopInfo *LoopDepthCalc;        // to calculate loop depths 
 
+  std::map<const Function *, Constant *> FnAllocState;
+
   PhyRegAlloc(const PhyRegAlloc&);     // DO NOT IMPLEMENT
   void operator=(const PhyRegAlloc&);  // DO NOT IMPLEMENT
 public:
@@ -89,6 +99,8 @@ public:
   ///
   virtual bool runOnFunction (Function &F);
 
+  virtual bool doFinalization (Module &M);
+
   virtual void getAnalysisUsage (AnalysisUsage &AU) const;
 
   const char *getPassName () const {
@@ -108,6 +120,7 @@ private:
   void addInterferencesForArgs();
   void createIGNodeListsAndIGs();
   void buildInterferenceGraphs();
+  void saveState();
 
   void setCallInterferences(const MachineInstr *MI, 
                            const ValueSet *LVSetAft);