aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorRuchira Sasanka <sasanka@students.uiuc.edu>2001-09-08 14:22:50 +0000
committerRuchira Sasanka <sasanka@students.uiuc.edu>2001-09-08 14:22:50 +0000
commit7cd2ca13c1920e9db68695a364048cb6586bb324 (patch)
treee2e68e264d5af71eb75b5338cff0a7316e509f49 /include/llvm/CodeGen/MachineInstr.h
parentc7136d2b09a796528d7ce790190394dceb3ab6c3 (diff)
Committed for compliation. Not yet final.
--Ruchira git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index fbb3106810..949c1832d1 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -135,6 +135,17 @@ private:
friend class MachineInstr;
friend class ValOpIterator<const MachineInstr, const Value>;
friend class ValOpIterator< MachineInstr, Value>;
+
+
+public:
+
+ // this replaces a value with a register after register allcoation
+ void setRegForValue(int Reg) {
+ assert(opType == MO_VirtualRegister || opType == MO_CCRegister);
+ opType = MO_MachineRegister;
+ regNum = Reg;
+ }
+
};
@@ -244,6 +255,10 @@ public:
bool operandIsDefined(unsigned int i) const;
void dump (unsigned int indent = 0) const;
+
+
+
+
public:
friend ostream& operator<<(ostream& os, const MachineInstr& minstr);
@@ -395,10 +410,10 @@ MachineCodeForVMInstr::~MachineCodeForVMInstr()
//---------------------------------------------------------------------------
-class MachineCodeForBasicBlock: public vector<const MachineInstr*> {
+class MachineCodeForBasicBlock: public vector<MachineInstr*> {
public:
- typedef vector<const MachineInstr*>::iterator iterator;
- typedef vector<const MachineInstr*>::const_iterator const_iterator;
+ typedef vector<MachineInstr*>::iterator iterator;
+ typedef vector<MachineInstr*>::const_iterator const_iterator;
};
@@ -461,7 +476,7 @@ ostream& operator<<(ostream& os, const MachineInstr& minstr);
ostream& operator<<(ostream& os, const MachineOperand& mop);
-void PrintMachineInstructions (Method* method);
+void PrintMachineInstructions (const Method *const method);
//**************************************************************************/