diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-07-30 18:48:43 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-07-30 18:48:43 +0000 |
commit | 76d3520f3e2d9c3ff306155a32ddedfcfa26ad16 (patch) | |
tree | 49d30aca8eced126c209c6034a8c5f25ab17aafc /lib/Target/SparcV9/InstrSelection | |
parent | b63933975f7d7381bc4310925ce2a7ceb6095a88 (diff) | |
download | external_llvm-76d3520f3e2d9c3ff306155a32ddedfcfa26ad16.zip external_llvm-76d3520f3e2d9c3ff306155a32ddedfcfa26ad16.tar.gz external_llvm-76d3520f3e2d9c3ff306155a32ddedfcfa26ad16.tar.bz2 |
Record machine instructions in the vector for each basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/InstrSelection')
-rw-r--r-- | lib/Target/SparcV9/InstrSelection/InstrSelection.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp index 9cc054c..4b389b7 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp @@ -96,6 +96,20 @@ bool SelectInstructionsForMethod(Method* method, TargetMachine &Target) { PrintMachineInstructions(method); } + // + // Record instructions in the vector for each basic block + // + for (Method::iterator BI = method->begin(); BI != method->end(); ++BI) + { + MachineCodeForBasicBlock& bbMvec = (*BI)->getMachineInstrVec(); + for (BasicBlock::iterator II = (*BI)->begin(); II != (*BI)->end(); ++II) + { + MachineCodeForVMInstr& mvec = (*II)->getMachineInstrVec(); + for (unsigned i=0; i < mvec.size(); i++) + bbMvec.push_back(mvec[i]); + } + } + return false; } |