summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-03 07:24:05 +0000
committerChris Lattner <sabre@nondot.org>2002-02-03 07:24:05 +0000
commit88e2fbc4bbe63ca5f208a4e9c7f47ff6711923e8 (patch)
tree0db22d4e532dd797b85a30570cb3674e7c0faf58 /include/llvm
parent871b1939b52553a6bb1d51d326b0b1356de03353 (diff)
downloadllvm-88e2fbc4bbe63ca5f208a4e9c7f47ff6711923e8.tar.gz
llvm-88e2fbc4bbe63ca5f208a4e9c7f47ff6711923e8.tar.bz2
llvm-88e2fbc4bbe63ca5f208a4e9c7f47ff6711923e8.tar.xz
Add methods to TargetMachine to:
* Output assembly code a method at a time instead of building it all up then emitting it as a whole module * Release memory contained in various annotations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Target/TargetMachine.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index 6effeedef5..1eb8cd27b4 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/include/llvm/Target/TargetMachine.h
@@ -10,21 +10,14 @@
#include "llvm/Target/TargetData.h"
#include "Support/NonCopyable.h"
-class TargetMachine;
class MachineInstrInfo;
class MachineInstrDescriptor;
class MachineSchedInfo;
class MachineRegInfo;
class MachineFrameInfo;
class MachineCacheInfo;
-
-//---------------------------------------------------------------------------
-// Data types used to define information about a single machine instruction
-//---------------------------------------------------------------------------
-
-typedef int MachineOpCode;
-typedef int OpCodeMask;
-
+class Module;
+class Method;
//---------------------------------------------------------------------------
// class TargetMachine
@@ -86,7 +79,20 @@ public:
// 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;
};
#endif