[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h

Alkis Evlogimenos alkis at cs.uiuc.edu
Wed Feb 11 20:28:38 PST 2004


Changes in directory llvm/include/llvm/Target:

MRegisterInfo.h updated: 1.28 -> 1.29

---
Log message:

Change MachineBasicBlock's vector of MachineInstr pointers into an
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.


---
Diffs of the changes:  (+8 -7)

Index: llvm/include/llvm/Target/MRegisterInfo.h
diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.28 llvm/include/llvm/Target/MRegisterInfo.h:1.29
--- llvm/include/llvm/Target/MRegisterInfo.h:1.28	Sun Feb  1 11:14:20 2004
+++ llvm/include/llvm/Target/MRegisterInfo.h	Wed Feb 11 20:27:10 2004
@@ -16,13 +16,14 @@
 #ifndef LLVM_TARGET_MREGISTERINFO_H
 #define LLVM_TARGET_MREGISTERINFO_H
 
-#include "llvm/CodeGen/MachineBasicBlock.h"
 #include <cassert>
 
 namespace llvm {
 
 class Type;
+class MachineBasicBlock;
 class MachineFunction;
+class MachineInstr;
 
 /// MRegisterDesc - This record contains all of the information known about a
 /// particular register.  The AliasSet field (if not null) contains a pointer to
@@ -226,17 +227,17 @@
   //
 
   virtual int storeRegToStackSlot(MachineBasicBlock &MBB,
-                                  MachineBasicBlock::iterator &MBBI,
+                                  MachineInstr* MI,
                                   unsigned SrcReg, int FrameIndex,
                                   const TargetRegisterClass *RC) const = 0;
 
   virtual int loadRegFromStackSlot(MachineBasicBlock &MBB,
-                                   MachineBasicBlock::iterator &MBBI,
+                                   MachineInstr* MI,
                                    unsigned DestReg, int FrameIndex,
                                    const TargetRegisterClass *RC) const = 0;
 
   virtual int copyRegToReg(MachineBasicBlock &MBB,
-                           MachineBasicBlock::iterator &MBBI,
+                           MachineInstr* MI,
                            unsigned DestReg, unsigned SrcReg,
                            const TargetRegisterClass *RC) const = 0;
 
@@ -260,8 +261,8 @@
   /// instructions added to (negative if removed from) the basic block.
   ///
   virtual int eliminateCallFramePseudoInstr(MachineFunction &MF,
-					     MachineBasicBlock &MBB,
-                                         MachineBasicBlock::iterator &I) const {
+                                            MachineBasicBlock &MBB,
+                                            MachineInstr* MI) const {
     assert(getCallFrameSetupOpcode()== -1 && getCallFrameDestroyOpcode()== -1 &&
 	   "eliminateCallFramePseudoInstr must be implemented if using"
 	   " call frame setup/destroy pseudo instructions!");
@@ -289,7 +290,7 @@
   /// added to (negative if removed from) the basic block.
   ///
   virtual int eliminateFrameIndex(MachineFunction &MF,
-                                  MachineBasicBlock::iterator &II) const = 0;
+                                  MachineInstr* MI) const = 0;
 
   /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
   /// the function. The return value is the number of instructions





More information about the llvm-commits mailing list