From 8474f6fcda95068c373e68a43fb0cf5a12662f97 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 23 Sep 2003 15:13:04 +0000 Subject: [PATCH] Move getAnalysisUsage method from header to .cpp file. Add a normal file header comment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8679 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 6 ++++ lib/CodeGen/RegAlloc/PhyRegAlloc.h | 37 +++++++++------------ lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 6 ++++ lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h | 37 +++++++++------------ 4 files changed, 44 insertions(+), 42 deletions(-) diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index 0c64846e5cb..92cf3765168 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp @@ -43,6 +43,12 @@ FunctionPass *getRegisterAllocator(TargetMachine &T) { return new PhyRegAlloc (T); } +void PhyRegAlloc::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired (); + AU.addRequired (); +} + + //---------------------------------------------------------------------------- // This method initially creates interference graphs (one in each reg class) diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.h b/lib/CodeGen/RegAlloc/PhyRegAlloc.h index 7156b1f6ec0..438f2c56a91 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.h +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.h @@ -1,20 +1,18 @@ -/* Title: PhyRegAlloc.h -*- C++ -*- - Author: Ruchira Sasanka - Date: Aug 20, 01 - Purpose: This is the main entry point for register allocation. - - Notes: - ===== - - * RegisterClasses: Each RegClass accepts a - TargetRegClass which contains machine specific info about that register - class. The code in the RegClass is machine independent and they use - access functions in the TargetRegClass object passed into it to get - machine specific info. - - * Machine dependent work: All parts of the register coloring algorithm - except coloring of an individual node are machine independent. -*/ +//===-- PhyRegAlloc.h - Graph Coloring Register Allocator -------*- c++ -*-===// +// +// This is the main entry point for register allocation. +// +// Notes: +// * RegisterClasses: Each RegClass accepts a +// TargetRegClass which contains machine specific info about that register +// class. The code in the RegClass is machine independent and they use +// access functions in the TargetRegClass object passed into it to get +// machine specific info. +// +// * Machine dependent work: All parts of the register coloring algorithm +// except coloring of an individual node are machine independent. +// +//===----------------------------------------------------------------------===// #ifndef PHYREGALLOC_H #define PHYREGALLOC_H @@ -91,10 +89,7 @@ public: /// virtual bool runOnFunction (Function &F); - virtual void getAnalysisUsage (AnalysisUsage &AU) const { - AU.addRequired (); - AU.addRequired (); - } + virtual void getAnalysisUsage (AnalysisUsage &AU) const; const char *getPassName () const { return "Traditional graph-coloring reg. allocator"; diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index 0c64846e5cb..92cf3765168 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -43,6 +43,12 @@ FunctionPass *getRegisterAllocator(TargetMachine &T) { return new PhyRegAlloc (T); } +void PhyRegAlloc::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired (); + AU.addRequired (); +} + + //---------------------------------------------------------------------------- // This method initially creates interference graphs (one in each reg class) diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h index 7156b1f6ec0..438f2c56a91 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h @@ -1,20 +1,18 @@ -/* Title: PhyRegAlloc.h -*- C++ -*- - Author: Ruchira Sasanka - Date: Aug 20, 01 - Purpose: This is the main entry point for register allocation. - - Notes: - ===== - - * RegisterClasses: Each RegClass accepts a - TargetRegClass which contains machine specific info about that register - class. The code in the RegClass is machine independent and they use - access functions in the TargetRegClass object passed into it to get - machine specific info. - - * Machine dependent work: All parts of the register coloring algorithm - except coloring of an individual node are machine independent. -*/ +//===-- PhyRegAlloc.h - Graph Coloring Register Allocator -------*- c++ -*-===// +// +// This is the main entry point for register allocation. +// +// Notes: +// * RegisterClasses: Each RegClass accepts a +// TargetRegClass which contains machine specific info about that register +// class. The code in the RegClass is machine independent and they use +// access functions in the TargetRegClass object passed into it to get +// machine specific info. +// +// * Machine dependent work: All parts of the register coloring algorithm +// except coloring of an individual node are machine independent. +// +//===----------------------------------------------------------------------===// #ifndef PHYREGALLOC_H #define PHYREGALLOC_H @@ -91,10 +89,7 @@ public: /// virtual bool runOnFunction (Function &F); - virtual void getAnalysisUsage (AnalysisUsage &AU) const { - AU.addRequired (); - AU.addRequired (); - } + virtual void getAnalysisUsage (AnalysisUsage &AU) const; const char *getPassName () const { return "Traditional graph-coloring reg. allocator";