Add method to update livevar when an instruction moves
[oota-llvm.git] / lib / CodeGen / MachineCodeEmitter.cpp
index af41ce468cf34bb6a2232e17fd9984b26710ca2d..d9b1f7ce450ce3e60baceacaa395959f927f5496 100644 (file)
@@ -1,4 +1,11 @@
 //===-- MachineCodeEmitter.cpp - Implement the MachineCodeEmitter itf -----===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
 //
 // This file implements the MachineCodeEmitter interface.
 //
@@ -9,6 +16,8 @@
 #include "llvm/Function.h"
 #include <fstream>
 
+namespace llvm {
+
 namespace {
   struct DebugMachineCodeEmitter : public MachineCodeEmitter {
     void startFunction(MachineFunction &F) {
@@ -47,18 +56,7 @@ namespace {
       return 0;
     }
   };
-}
-
-
-/// createDebugMachineCodeEmitter - Return a dynamically allocated machine
-/// code emitter, which just prints the opcodes and fields out the cout.  This
-/// can be used for debugging users of the MachineCodeEmitter interface.
-///
-MachineCodeEmitter *MachineCodeEmitter::createDebugEmitter() {
-  return new DebugMachineCodeEmitter();
-}
 
-namespace {
   class FilePrinterEmitter : public MachineCodeEmitter {
     std::ofstream actual;
     std::ostream &o;
@@ -93,6 +91,10 @@ namespace {
       MCE.finishFunction(F);
     }
 
+    void emitConstantPool(MachineConstantPool *MCP) {
+      MCE.emitConstantPool(MCP);
+    }
+
     void startFunctionStub(const Function &F, unsigned StubSize) {
       MCE.startFunctionStub(F, StubSize);
     }
@@ -158,7 +160,18 @@ namespace {
   };
 }
 
+/// createDebugMachineCodeEmitter - Return a dynamically allocated machine
+/// code emitter, which just prints the opcodes and fields out the cout.  This
+/// can be used for debugging users of the MachineCodeEmitter interface.
+///
+MachineCodeEmitter *
+MachineCodeEmitter::createDebugEmitter() {
+  return new DebugMachineCodeEmitter();
+}
+
 MachineCodeEmitter *
 MachineCodeEmitter::createFilePrinterEmitter(MachineCodeEmitter &MCE) {
   return new FilePrinterEmitter(MCE, std::cerr);
 }
+
+} // End llvm namespace