-//===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
+//===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 -*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file declares the top-level UltraSPARC target machine.
+// This file declares the top-level SparcV9 target machine.
//
//===----------------------------------------------------------------------===//
-#ifndef SPARC_TARGETMACHINE_H
-#define SPARC_TARGETMACHINE_H
+#ifndef SPARCV9TARGETMACHINE_H
+#define SPARCV9TARGETMACHINE_H
#include "llvm/Target/TargetFrameInfo.h"
#include "llvm/Target/TargetMachine.h"
-#include "SparcInstrInfo.h"
-#include "SparcInternals.h"
-#include "SparcRegInfo.h"
-#include "SparcFrameInfo.h"
-#include "SparcJITInfo.h"
+#include "SparcV9InstrInfo.h"
+#include "SparcV9Internals.h"
+#include "SparcV9RegInfo.h"
+#include "SparcV9FrameInfo.h"
+#include "SparcV9JITInfo.h"
namespace llvm {
class PassManager;
-class SparcTargetMachine : public TargetMachine {
- SparcInstrInfo instrInfo;
- SparcSchedInfo schedInfo;
- SparcRegInfo regInfo;
- SparcFrameInfo frameInfo;
- SparcCacheInfo cacheInfo;
- SparcJITInfo jitInfo;
+class SparcV9TargetMachine : public TargetMachine {
+ SparcV9InstrInfo instrInfo;
+ SparcV9SchedInfo schedInfo;
+ SparcV9RegInfo regInfo;
+ SparcV9FrameInfo frameInfo;
+ SparcV9JITInfo jitInfo;
public:
- SparcTargetMachine(IntrinsicLowering *IL);
+ SparcV9TargetMachine(const Module &M, IntrinsicLowering *IL);
- virtual const TargetInstrInfo &getInstrInfo() const { return instrInfo; }
- virtual const TargetSchedInfo &getSchedInfo() const { return schedInfo; }
- virtual const TargetRegInfo &getRegInfo() const { return regInfo; }
- virtual const TargetFrameInfo &getFrameInfo() const { return frameInfo; }
- virtual const TargetCacheInfo &getCacheInfo() const { return cacheInfo; }
+ virtual const TargetInstrInfo *getInstrInfo() const { return &instrInfo; }
+ virtual const TargetSchedInfo *getSchedInfo() const { return &schedInfo; }
+ virtual const SparcV9RegInfo *getRegInfo() const { return ®Info; }
+ virtual const TargetFrameInfo *getFrameInfo() const { return &frameInfo; }
virtual TargetJITInfo *getJITInfo() { return &jitInfo; }
+ virtual const MRegisterInfo *getRegisterInfo() const {
+ return &instrInfo.getRegisterInfo();
+ }
virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
MachineCodeEmitter &MCE);
+
+ static unsigned getModuleMatchQuality(const Module &M);
+ static unsigned getJITMatchQuality();
};
} // End llvm namespace