aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-03 07:31:41 +0000
committerChris Lattner <sabre@nondot.org>2002-02-03 07:31:41 +0000
commita8bbb6bcedda02058c5548b8eb99fcc1f348dde9 (patch)
tree56a7b0e6792655005bf0afbdf4ba429f3bca17b4
parentde6dbabaee55de5693950ac5f8d7cb7cc10ba27f (diff)
* Swich to annotation model for MachineCodeForInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1646 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/InstrSelection/InstrForest.cpp18
-rw-r--r--lib/Target/SparcV9/InstrSelection/InstrForest.cpp18
2 files changed, 20 insertions, 16 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp
index 20cbe8d71b..29090e06cc 100644
--- a/lib/CodeGen/InstrSelection/InstrForest.cpp
+++ b/lib/CodeGen/InstrSelection/InstrForest.cpp
@@ -23,6 +23,7 @@
//---------------------------------------------------------------------------
#include "llvm/CodeGen/InstrForest.h"
+#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/Method.h"
#include "llvm/iTerminators.h"
#include "llvm/iMemory.h"
@@ -125,16 +126,17 @@ InstructionNode::dumpNode(int indent) const
cerr << " ";
cerr << getInstruction()->getOpcodeName();
-
- const vector<MachineInstr*> &mvec = getInstruction()->getMachineInstrVec();
+ const MachineCodeForInstruction &mvec =
+ MachineCodeForInstruction::get(getInstruction());
+
if (mvec.size() > 0)
cerr << "\tMachine Instructions: ";
- for (unsigned int i=0; i < mvec.size(); i++)
- {
- mvec[i]->dump(0);
- if (i < mvec.size() - 1)
- cerr << "; ";
- }
+
+ for (unsigned int i=0; i < mvec.size(); ++i) {
+ mvec[i]->dump(0);
+ if (i < mvec.size() - 1)
+ cerr << "; ";
+ }
cerr << "\n";
}
diff --git a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
index 20cbe8d71b..29090e06cc 100644
--- a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
+++ b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
@@ -23,6 +23,7 @@
//---------------------------------------------------------------------------
#include "llvm/CodeGen/InstrForest.h"
+#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/Method.h"
#include "llvm/iTerminators.h"
#include "llvm/iMemory.h"
@@ -125,16 +126,17 @@ InstructionNode::dumpNode(int indent) const
cerr << " ";
cerr << getInstruction()->getOpcodeName();
-
- const vector<MachineInstr*> &mvec = getInstruction()->getMachineInstrVec();
+ const MachineCodeForInstruction &mvec =
+ MachineCodeForInstruction::get(getInstruction());
+
if (mvec.size() > 0)
cerr << "\tMachine Instructions: ";
- for (unsigned int i=0; i < mvec.size(); i++)
- {
- mvec[i]->dump(0);
- if (i < mvec.size() - 1)
- cerr << "; ";
- }
+
+ for (unsigned int i=0; i < mvec.size(); ++i) {
+ mvec[i]->dump(0);
+ if (i < mvec.size() - 1)
+ cerr << "; ";
+ }
cerr << "\n";
}