[llvm-commits] CVS: llvm/lib/CodeGen/MachineBasicBlock.cpp MachineCodeForInstruction.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Oct 27 19:23:04 PST 2002


Changes in directory llvm/lib/CodeGen:

MachineBasicBlock.cpp updated: 1.2 -> 1.3
MachineCodeForInstruction.cpp updated: 1.5 -> 1.6

---
Log message:

Inline some methods from .cpp files into .h files, minor cleanups



---
Diffs of the changes:

Index: llvm/lib/CodeGen/MachineBasicBlock.cpp
diff -u llvm/lib/CodeGen/MachineBasicBlock.cpp:1.2 llvm/lib/CodeGen/MachineBasicBlock.cpp:1.3
--- llvm/lib/CodeGen/MachineBasicBlock.cpp:1.2	Sun Oct 27 18:37:53 2002
+++ llvm/lib/CodeGen/MachineBasicBlock.cpp	Sun Oct 27 19:21:55 2002
@@ -1,8 +1,8 @@
-//===-- llvm/CodeGen/MachineCodeForBasicBlock.cpp ---------------*- C++ -*--=//
+//===-- MachineCodeForBasicBlock.cpp --------------------------------------===//
 // 
-// Purpose:
-//   Collect the sequence of machine instructions for a basic block.
-//===---------------------------------------------------------------------===//
+// Collect the sequence of machine instructions for a basic block.
+//
+//===----------------------------------------------------------------------===//
 
 #include "llvm/CodeGen/MachineCodeForBasicBlock.h"
 
@@ -20,9 +20,4 @@
     AnnotationManager::registerAnnotationFactory(MCFBB_AID, &CreateMCFBB);
   }
 } RegisterCreateMCFBB;
-
-
-MachineBasicBlock::MachineBasicBlock()
-  : Annotation(MCFBB_AID)
-{}
 


Index: llvm/lib/CodeGen/MachineCodeForInstruction.cpp
diff -u llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.5 llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.6
--- llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.5	Mon Sep 16 10:13:59 2002
+++ llvm/lib/CodeGen/MachineCodeForInstruction.cpp	Sun Oct 27 19:21:55 2002
@@ -1,18 +1,17 @@
 //===-- MachineCodeForInstruction.cpp -------------------------------------===//
 //
-//   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 machine instructions:
+// 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
+// machine instructions:
 // 
-//   "Temporary values" are intermediate values used in the machine
-//   instruction sequence, but not in the VM instruction
-//   Note that such values should be treated as pure SSA values with
-//   no interpretation of their operands (i.e., as a TmpInstruction
-//   object which actually represents such a value).
+// "Temporary values" are intermediate values used in the machine instruction
+// sequence, but not in the VM instruction Note that such values should be
+// treated as pure SSA values with no interpretation of their operands (i.e., as
+// a TmpInstruction object which actually represents such a value).
 // 
-//   (2) "Implicit uses" are values used in the VM instruction but not in
-//       the machine instruction sequence
+// (2) "Implicit uses" are values used in the VM instruction but not in the
+//     machine instruction sequence
 // 
 //===----------------------------------------------------------------------===//
 
@@ -20,7 +19,7 @@
 #include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/CodeGen/InstrSelection.h"
 
-static AnnotationID MCFI_AID(
+AnnotationID MCFI_AID(
              AnnotationManager::getID("CodeGen::MachineCodeForInstruction"));
 
 static Annotation *CreateMCFI(AnnotationID AID, const Annotable *, void *) {
@@ -36,30 +35,12 @@
 } RegisterCreateMCFI;
 
 
-MachineCodeForInstruction&
-MachineCodeForInstruction::get(const Instruction *I){
-  assert(I != NULL);
-  return *(MachineCodeForInstruction*)I->getOrCreateAnnotation(MCFI_AID);
-}
-
-
-void
-MachineCodeForInstruction::destroy(const Instruction *I) {
-  I->deleteAnnotation(MCFI_AID);
-}
-
-
 void
 MachineCodeForInstruction::dropAllReferences()
 {
   for (unsigned i=0, N=tempVec.size(); i < N; i++)
     cast<TmpInstruction>(tempVec[i])->dropAllReferences();
 }
-
-
-MachineCodeForInstruction::MachineCodeForInstruction()
-  : Annotation(MCFI_AID)
-{}
 
 
 MachineCodeForInstruction::~MachineCodeForInstruction()





More information about the llvm-commits mailing list