From ccca2ed8543d2ec08782eb2237242d59b7b8f7b3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 3 Feb 2002 23:40:22 +0000 Subject: Revamp compilation to be pass based instead of being monolithic so that backend's can customize compilation as much as they want git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1661 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetMachine.h | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'include') diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index 1eb8cd27b4..97706a7cec 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -8,6 +8,7 @@ #define LLVM_TARGET_TARGETMACHINE_H #include "llvm/Target/TargetData.h" +#include "llvm/Pass.h" #include "Support/NonCopyable.h" class MachineInstrInfo; @@ -16,8 +17,6 @@ class MachineSchedInfo; class MachineRegInfo; class MachineFrameInfo; class MachineCacheInfo; -class Module; -class Method; //--------------------------------------------------------------------------- // class TargetMachine @@ -67,32 +66,11 @@ public: virtual unsigned int findOptimalStorageSize (const Type* ty) const; // - // compileMethod - Everything neccesary to compile a method into the - // built in representation. This allows the target to have complete control - // over how it does compilation. This does not emit assembly or output - // machine code, however; those are done later. + // addPassesToEmitAssembly - Add passes to the specified pass manager to get + // assembly langage code emited. Typically this will involve several steps of + // code generation. // - virtual bool compileMethod(Method *M) = 0; - - // - // emitAssembly - Output assembly language code (a .s file) for the specified - // method. The specified method must have been compiled before this may be - // used. - // - virtual void emitAssembly(const Method *M, std::ostream &OutStr) const = 0; - - // - // 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 = 0; - - // - // freeCompiledMethod - Release all memory associated with the compiled image - // for this method. - // - virtual void freeCompiledMethod(Method *M) = 0; + virtual void addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) = 0; }; #endif -- cgit v1.2.3