mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
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
This commit is contained in:
@@ -21,10 +21,12 @@
|
|||||||
#include "llvm/Target/MachineCacheInfo.h"
|
#include "llvm/Target/MachineCacheInfo.h"
|
||||||
#include "llvm/CodeGen/RegClass.h"
|
#include "llvm/CodeGen/RegClass.h"
|
||||||
#include "llvm/Type.h"
|
#include "llvm/Type.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
class LiveRange;
|
||||||
class UltraSparc;
|
class UltraSparc;
|
||||||
|
class PhyRegAlloc;
|
||||||
|
|
||||||
|
|
||||||
// OpCodeMask definitions for the Sparc V9
|
// OpCodeMask definitions for the Sparc V9
|
||||||
//
|
//
|
||||||
@@ -174,12 +176,6 @@ public:
|
|||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class LiveRange;
|
|
||||||
class UltraSparc;
|
|
||||||
class PhyRegAlloc;
|
|
||||||
|
|
||||||
|
|
||||||
class UltraSparcRegInfo : public MachineRegInfo
|
class UltraSparcRegInfo : public MachineRegInfo
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@@ -1417,7 +1413,6 @@ private:
|
|||||||
UltraSparcCacheInfo cacheInfo;
|
UltraSparcCacheInfo cacheInfo;
|
||||||
public:
|
public:
|
||||||
UltraSparc();
|
UltraSparc();
|
||||||
virtual ~UltraSparc() {}
|
|
||||||
|
|
||||||
virtual const MachineInstrInfo &getInstrInfo() const { return instrInfo; }
|
virtual const MachineInstrInfo &getInstrInfo() const { return instrInfo; }
|
||||||
virtual const MachineSchedInfo &getSchedInfo() const { return schedInfo; }
|
virtual const MachineSchedInfo &getSchedInfo() const { return schedInfo; }
|
||||||
@@ -1425,30 +1420,15 @@ public:
|
|||||||
virtual const MachineFrameInfo &getFrameInfo() const { return frameInfo; }
|
virtual const MachineFrameInfo &getFrameInfo() const { return frameInfo; }
|
||||||
virtual const MachineCacheInfo &getCacheInfo() const { return cacheInfo; }
|
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);
|
// addPassesToEmitAssembly - Add passes to the specified pass manager to get
|
||||||
|
// assembly langage code emited. For sparc, we have to do ...
|
||||||
|
//
|
||||||
|
virtual void addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
|
||||||
|
|
||||||
//
|
private:
|
||||||
// emitAssembly - Output assembly language code (a .s file) for the specified
|
Pass *getMethodAsmPrinterPass(PassManager &PM, std::ostream &Out);
|
||||||
// module. The specified module must have been compiled before this may be
|
Pass *getModuleAsmPrinterPass(PassManager &PM, std::ostream &Out);
|
||||||
// used.
|
|
||||||
//
|
|
||||||
virtual void emitAssembly(const Method *M, std::ostream &OutStr) const;
|
|
||||||
|
|
||||||
//
|
|
||||||
// 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);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user