Eliminate MachineFunction& argument from eliminateFrameIndex in x86 Target. Get...
[oota-llvm.git] / lib / Target / SparcV9 / MachineCodeForInstruction.h
index 9a08de79afab9ac6308706a60a969c07caf5b132..32935bba280e0c01d1b4ea37582af2834dfd64a3 100644 (file)
@@ -7,6 +7,9 @@
 // 
 //===----------------------------------------------------------------------===//
 //
+// FIXME: This file is SparcV9 specific.  Do not rely on this class for new 
+// targets, it will go away in the future.
+//
 // Representation of the sequence of machine instructions created for a single
 // VM instruction.  Additionally records information about hidden and implicit
 // values used by the machine instructions: about hidden values used by the
@@ -25,7 +28,6 @@
 #ifndef LLVM_CODEGEN_MACHINECODE_FOR_INSTRUCTION_H
 #define LLVM_CODEGEN_MACHINECODE_FOR_INSTRUCTION_H
 
-#include "Support/Annotation.h"
 #include <vector>
 
 namespace llvm {
@@ -35,24 +37,16 @@ class Instruction;
 class Value;
 class CallArgsDescriptor;
 
-extern AnnotationID MCFI_AID;
-
-class MachineCodeForInstruction : public Annotation {
+  class MachineCodeForInstruction {
   std::vector<Value*> tempVec;          // used by m/c instr but not VM instr
   std::vector<MachineInstr*> Contents;  // the machine instr for this VM instr
   CallArgsDescriptor* callArgsDesc;     // only used for CALL instructions
 public:
-  MachineCodeForInstruction() : Annotation(MCFI_AID), callArgsDesc(NULL) {}
+  MachineCodeForInstruction() : callArgsDesc(NULL) {}
   ~MachineCodeForInstruction();
   
-  static MachineCodeForInstruction &get(const Instruction *I) {
-    assert(I != NULL);
-    return *(MachineCodeForInstruction*)
-      ((Annotable*)I)->getOrCreateAnnotation(MCFI_AID);
-  }
-  static void destroy(const Instruction *I) {
-    ((Annotable*)I)->deleteAnnotation(MCFI_AID);
-  }
+  static MachineCodeForInstruction &get(const Instruction *I);
+  static void destroy(const Instruction *I);
 
   // Access to underlying machine instructions...
   typedef std::vector<MachineInstr*>::iterator iterator;