X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FInstrSelection%2FInstrSelection.cpp;h=4b389b732ce0c00c0e6401e5a8ed76603ed43721;hb=76d3520f3e2d9c3ff306155a32ddedfcfa26ad16;hp=9cc054ca4deecd8d5f6ba2a1425ca79c1a6a66f2;hpb=b63933975f7d7381bc4310925ce2a7ceb6095a88;p=oota-llvm.git diff --git a/lib/CodeGen/InstrSelection/InstrSelection.cpp b/lib/CodeGen/InstrSelection/InstrSelection.cpp index 9cc054ca4de..4b389b732ce 100644 --- a/lib/CodeGen/InstrSelection/InstrSelection.cpp +++ b/lib/CodeGen/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; }