aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-03 23:42:19 +0000
committerChris Lattner <sabre@nondot.org>2002-02-03 23:42:19 +0000
commit4387e3128b16c593d1a4a2411b764b7ccee15fe1 (patch)
treefa899e8d9b21e02f642747dffc1d3a4883907a1f
parent0feb358654b360255084dd2f23df53d3be43e65b (diff)
downloadexternal_llvm-4387e3128b16c593d1a4a2411b764b7ccee15fe1.zip
external_llvm-4387e3128b16c593d1a4a2411b764b7ccee15fe1.tar.gz
external_llvm-4387e3128b16c593d1a4a2411b764b7ccee15fe1.tar.bz2
Convert sparc backend over to use pass based compilation structure.
Try to decouple stuff as much as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1664 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/SparcV9Internals.h38
1 files changed, 9 insertions, 29 deletions
diff --git a/lib/Target/SparcV9/SparcV9Internals.h b/lib/Target/SparcV9/SparcV9Internals.h
index fd9f936..de8643a 100644
--- a/lib/Target/SparcV9/SparcV9Internals.h
+++ b/lib/Target/SparcV9/SparcV9Internals.h
@@ -21,10 +21,12 @@
#include "llvm/Target/MachineCacheInfo.h"
#include "llvm/CodeGen/RegClass.h"
#include "llvm/Type.h"
-
#include <sys/types.h>
+class LiveRange;
class UltraSparc;
+class PhyRegAlloc;
+
// OpCodeMask definitions for the Sparc V9
//
@@ -174,12 +176,6 @@ public:
//
//----------------------------------------------------------------------------
-
-class LiveRange;
-class UltraSparc;
-class PhyRegAlloc;
-
-
class UltraSparcRegInfo : public MachineRegInfo
{
private:
@@ -1417,38 +1413,22 @@ private:
UltraSparcCacheInfo cacheInfo;
public:
UltraSparc();
- virtual ~UltraSparc() {}
virtual const MachineInstrInfo &getInstrInfo() const { return instrInfo; }
virtual const MachineSchedInfo &getSchedInfo() const { return schedInfo; }
virtual const MachineRegInfo &getRegInfo() const { return regInfo; }
virtual const MachineFrameInfo &getFrameInfo() const { return frameInfo; }
virtual const MachineCacheInfo &getCacheInfo() const { return cacheInfo; }
-
- // compileMethod - For the sparc, we do instruction selection, followed by
- // delay slot scheduling, then register allocation.
- //
- virtual bool compileMethod(Method *M);
//
- // emitAssembly - Output assembly language code (a .s file) for the specified
- // module. The specified module must have been compiled before this may be
- // used.
+ // addPassesToEmitAssembly - Add passes to the specified pass manager to get
+ // assembly langage code emited. For sparc, we have to do ...
//
- virtual void emitAssembly(const Method *M, std::ostream &OutStr) const;
+ virtual void addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
- //
- // emitAssembly - Output assembly language code (a .s file) for global
- // components of the specified module. This assumes that methods have been
- // previously output.
- //
- virtual void emitAssembly(const Module *M, std::ostream &OutStr) const;
-
- //
- // freeCompiledMethod - Release all memory associated with the compiled image
- // for this method.
- //
- virtual void freeCompiledMethod(Method *M);
+private:
+ Pass *getMethodAsmPrinterPass(PassManager &PM, std::ostream &Out);
+ Pass *getModuleAsmPrinterPass(PassManager &PM, std::ostream &Out);
};
#endif