Update due to mainline API change
authorAnton Korobeynikov <asl@math.spbu.ru>
Sun, 3 May 2009 13:19:42 +0000 (13:19 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sun, 3 May 2009 13:19:42 +0000 (13:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70769 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/MSP430/MSP430.h
lib/Target/MSP430/MSP430AsmPrinter.cpp
lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
lib/Target/MSP430/MSP430TargetMachine.cpp
lib/Target/MSP430/MSP430TargetMachine.h

index 3fa024caed0bde932ef34f59d566a91ba5bb9f30..ed0cd0496aaa24b6571b558ee2aadbf68737df01 100644 (file)
 #ifndef LLVM_TARGET_MSP430_H
 #define LLVM_TARGET_MSP430_H
 
+#include "llvm/Target/TargetMachine.h"
+
 namespace llvm {
   class MSP430TargetMachine;
   class FunctionPass;
   class raw_ostream;
 
-  FunctionPass *createMSP430ISelDag(MSP430TargetMachine &TM);
-  FunctionPass *createMSP430CodePrinterPass(raw_ostream &OS,
-                                            MSP430TargetMachine &TM,
-                                            bool Fast, bool Verbose);
+  FunctionPass *createMSP430ISelDag(MSP430TargetMachine &TM,
+                                    CodeGenOpt::Level OptLevel);
+  FunctionPass *createMSP430CodePrinterPass(raw_ostream &o,
+                                            MSP430TargetMachine &tm,
+                                            CodeGenOpt::Level OptLevel,
+                                            bool verbose);
 } // end namespace llvm;
 
 // Defines symbolic names for MSP430 registers.
index c606112c2c6732b0524f7b53ff07247f2d215ce8..71b785bb4fe5ff2df6637d5e3f254ef6986e6f6b 100644 (file)
@@ -40,8 +40,9 @@ namespace {
   class VISIBILITY_HIDDEN MSP430AsmPrinter : public AsmPrinter {
   public:
     MSP430AsmPrinter(raw_ostream &O, MSP430TargetMachine &TM,
-                    const TargetAsmInfo *TAI, bool Fast, bool Verbose)
-      : AsmPrinter(O, TM, TAI, Fast, Verbose) {}
+                     const TargetAsmInfo *TAI,
+                     CodeGenOpt::Level OL, bool V)
+      : AsmPrinter(O, TM, TAI, OL, V) {}
 
     virtual const char *getPassName() const {
       return "MSP430 Assembly Printer";
@@ -76,8 +77,9 @@ namespace {
 ///
 FunctionPass *llvm::createMSP430CodePrinterPass(raw_ostream &o,
                                                 MSP430TargetMachine &tm,
-                                                bool fast, bool verbose) {
-  return new MSP430AsmPrinter(o, tm, tm.getTargetAsmInfo(), fast, verbose);
+                                                CodeGenOpt::Level OptLevel,
+                                                bool verbose) {
+  return new MSP430AsmPrinter(o, tm, tm.getTargetAsmInfo(), OptLevel, verbose);
 }
 
 bool MSP430AsmPrinter::doInitialization(Module &M) {
index 91915d7559e0070de9d54b160d6792ee54adc929..32e1f7a57aad94b2dd145b0cb594d706f1cb66c4 100644 (file)
@@ -41,8 +41,8 @@ namespace {
     const MSP430Subtarget &Subtarget;
 
   public:
-    MSP430DAGToDAGISel(MSP430TargetMachine &TM)
-      : SelectionDAGISel(TM),
+    MSP430DAGToDAGISel(MSP430TargetMachine &TM, CodeGenOpt::Level OptLevel)
+      : SelectionDAGISel(TM, OptLevel),
         Lowering(*TM.getTargetLowering()),
         Subtarget(*TM.getSubtargetImpl()) { }
 
@@ -68,8 +68,9 @@ namespace {
 /// createMSP430ISelDag - This pass converts a legalized DAG into a
 /// MSP430-specific DAG, ready for instruction scheduling.
 ///
-FunctionPass *llvm::createMSP430ISelDag(MSP430TargetMachine &TM) {
-  return new MSP430DAGToDAGISel(TM);
+FunctionPass *llvm::createMSP430ISelDag(MSP430TargetMachine &TM,
+                                        CodeGenOpt::Level OptLevel) {
+  return new MSP430DAGToDAGISel(TM, OptLevel);
 }
 
 // FIXME: This is pretty dummy routine and needs to be rewritten in the future.
index 155f8c2bac3b125f040d3f5811370d308d788e8e..78869463f3a2aeb218f156d48b4d027cc13f1237 100644 (file)
@@ -47,17 +47,19 @@ const TargetAsmInfo *MSP430TargetMachine::createTargetAsmInfo() const {
   return new MSP430TargetAsmInfo(*this);
 }
 
-bool MSP430TargetMachine::addInstSelector(PassManagerBase &PM, bool Fast) {
+bool MSP430TargetMachine::addInstSelector(PassManagerBase &PM,
+                                          CodeGenOpt::Level OptLevel) {
   // Install an instruction selector.
-  PM.add(createMSP430ISelDag(*this));
+  PM.add(createMSP430ISelDag(*this, OptLevel));
   return false;
 }
 
 bool MSP430TargetMachine::addAssemblyEmitter(PassManagerBase &PM,
-                                             bool Fast, bool Verbose,
+                                             CodeGenOpt::Level OptLevel,
+                                             bool Verbose,
                                              raw_ostream &Out) {
   // Output assembly language.
-  PM.add(createMSP430CodePrinterPass(Out, *this, Fast, Verbose));
+  PM.add(createMSP430CodePrinterPass(Out, *this, OptLevel, Verbose));
   return false;
 }
 
index 258a3951ca1a23d1fd1150250c8967e6c5501591..d9ffa2b5ac8ff25383b21540809d282e599c4d90 100644 (file)
@@ -56,9 +56,10 @@ public:
     return const_cast<MSP430TargetLowering*>(&TLInfo);
   }
 
-  virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
-  virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
-                                  bool Verbose, raw_ostream &Out);
+  virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
+  virtual bool addAssemblyEmitter(PassManagerBase &PM,
+                                  CodeGenOpt::Level OptLevel, bool Verbose,
+                                  raw_ostream &Out);
   static unsigned getModuleMatchQuality(const Module &M);
 }; // MSP430TargetMachine.