Add completely untested support for mtcrf/mfcrf encoding
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9TargetMachine.h
index 8f1d08838515ef766c4380a37f67b20f798bdc4d..4a1539c3642502edb2a507e27ce43ce2ea648adc 100644 (file)
@@ -1,4 +1,4 @@
-//===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 ---*- C++ -*-===//
+//===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 -*- C++ -*-=//
 // 
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,12 +7,12 @@
 // 
 //===----------------------------------------------------------------------===//
 // 
-// 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"
@@ -32,12 +32,12 @@ class SparcV9TargetMachine : public TargetMachine {
   SparcV9FrameInfo frameInfo;
   SparcV9JITInfo   jitInfo;
 public:
-  SparcV9TargetMachine(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 TargetInstrInfo  *getInstrInfo() const { return &instrInfo; }
+  virtual const TargetSchedInfo  *getSchedInfo() const { return &schedInfo; }
+  virtual const SparcV9RegInfo   *getRegInfo()   const { return &regInfo; }
+  virtual const TargetFrameInfo  *getFrameInfo() const { return &frameInfo; }
   virtual       TargetJITInfo    *getJITInfo()         { return &jitInfo; }
   virtual const MRegisterInfo    *getRegisterInfo() const {
     return &instrInfo.getRegisterInfo();
@@ -46,6 +46,9 @@ public:
   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