summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-03 23:40:22 +0000
committerChris Lattner <sabre@nondot.org>2002-02-03 23:40:22 +0000
commitccca2ed8543d2ec08782eb2237242d59b7b8f7b3 (patch)
treece11c1edd3b088c1333bfa6ecb8d25a4c10a984e /include
parentf2868ce228ca20f72d1c6fbe241de01975cfe609 (diff)
downloadllvm-ccca2ed8543d2ec08782eb2237242d59b7b8f7b3.tar.gz
llvm-ccca2ed8543d2ec08782eb2237242d59b7b8f7b3.tar.bz2
llvm-ccca2ed8543d2ec08782eb2237242d59b7b8f7b3.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetMachine.h32
1 files changed, 5 insertions, 27 deletions
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