addPassesToJITCompile and addPassesToEmitMachineCode now take a
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 13 Aug 2003 18:17:27 +0000 (18:17 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 13 Aug 2003 18:17:27 +0000 (18:17 +0000)
 FunctionPassManager, to support function-at-a-time compilation and
 emission of code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7821 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetMachine.h
lib/Target/X86/X86CodeEmitter.cpp
lib/Target/X86/X86TargetMachine.h

index 09bfca7ed266a8584b5e8bf6dbbdfe810c5eb215..11886db3f598c99173cb639bb529750552f16cef 100644 (file)
@@ -19,6 +19,7 @@ class TargetCacheInfo;
 class TargetOptInfo;
 class MachineCodeEmitter;
 class MRegisterInfo;
+class FunctionPassManager;
 class PassManager;
 class Pass;
 
@@ -79,7 +80,7 @@ public:
   /// implement a fast dynamic compiler for this target.  Return true if this is
   /// not supported for this target.
   ///
-  virtual bool addPassesToJITCompile(PassManager &PM) { return true; }
+  virtual bool addPassesToJITCompile(FunctionPassManager &PM) { return true; }
 
   /// addPassesToEmitAssembly - Add passes to the specified pass manager to get
   /// assembly langage code emitted.  Typically this will involve several steps
@@ -91,12 +92,12 @@ public:
   }
 
   /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
-  /// get machine code emitted.  This uses a MAchineCodeEmitter object to handle
+  /// get machine code emitted.  This uses a MachineCodeEmitter object to handle
   /// actually outputting the machine code and resolving things like the address
   /// of functions.  This method should returns true if machine code emission is
   /// not supported.
   ///
-  virtual bool addPassesToEmitMachineCode(PassManager &PM,
+  virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
                                           MachineCodeEmitter &MCE) {
     return true;
   }
index 50b1faac8b37865a553f8283470896b36967f8da..5f19edb4ab0b955af059084620ffaa280d18ea2c 100644 (file)
@@ -181,7 +181,7 @@ namespace {
 /// of functions.  This method should returns true if machine code emission is
 /// not supported.
 ///
-bool X86TargetMachine::addPassesToEmitMachineCode(PassManager &PM,
+bool X86TargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
                                                   MachineCodeEmitter &MCE) {
   PM.add(new Emitter(MCE));
   return false;
index 0b2981d38098e2a3b918f2fd5e42ddb8c33ab45a..631b42ae86898cf24f75cf72b0e872b8e7d8799b 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetFrameInfo.h"
+#include "llvm/PassManager.h"
 #include "X86InstrInfo.h"
 
 class X86TargetMachine : public TargetMachine {
@@ -32,15 +33,15 @@ public:
   /// implement a fast dynamic compiler for this target.  Return true if this is
   /// not supported for this target.
   ///
-  virtual bool addPassesToJITCompile(PassManager &PM);
+  virtual bool addPassesToJITCompile(FunctionPassManager &PM);
 
   /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
-  /// get machine code emitted.  This uses a MAchineCodeEmitter object to handle
+  /// get machine code emitted.  This uses a MachineCodeEmitter object to handle
   /// actually outputting the machine code and resolving things like the address
   /// of functions.  This method should returns true if machine code emission is
   /// not supported.
   ///
-  virtual bool addPassesToEmitMachineCode(PassManager &PM,
+  virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
                                           MachineCodeEmitter &MCE);
   
   virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);