diff --git a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp index b88ac520178..07e6a467d18 100644 --- a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp +++ b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp @@ -8,7 +8,7 @@ #include "llvm/CodeGen/RegAllocCommon.h" #include "llvm/CodeGen/RegClass.h" #include "llvm/CodeGen/MachineInstr.h" -#include "llvm/CodeGen/MachineCodeForBasicBlock.h" +#include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Function.h" #include "llvm/BasicBlock.h" @@ -148,10 +148,10 @@ void LiveRangeInfo::constructLiveRanges() { // for (Function::const_iterator BBI=Meth->begin(); BBI != Meth->end(); ++BBI){ // get the vector of machine instructions for this basic block. - MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI); + MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI); // iterate over all the machine instructions in BB - for(MachineCodeForBasicBlock::iterator MInstIterator = MIVec.begin(); + for(MachineBasicBlock::iterator MInstIterator = MIVec.begin(); MInstIterator != MIVec.end(); ++MInstIterator) { MachineInstr *MInst = *MInstIterator; @@ -252,12 +252,11 @@ void LiveRangeInfo::coalesceLRs() BBI != BBE; ++BBI) { // get the iterator for machine instructions - const MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI); - MachineCodeForBasicBlock::const_iterator MInstIterator = MIVec.begin(); + const MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI); + MachineBasicBlock::const_iterator MInstIterator = MIVec.begin(); // iterate over all the machine instructions in BB for( ; MInstIterator != MIVec.end(); ++MInstIterator) { - const MachineInstr * MInst = *MInstIterator; if( DEBUG_RA >= RA_DEBUG_LiveRanges) { diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index 9899dbc71cc..cdb5d189943 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp @@ -9,7 +9,7 @@ #include "llvm/CodeGen/PhyRegAlloc.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineInstrAnnot.h" -#include "llvm/CodeGen/MachineCodeForBasicBlock.h" +#include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h" #include "llvm/Analysis/LoopInfo.h" @@ -275,8 +275,8 @@ void PhyRegAlloc::buildInterferenceGraphs() // get the iterator for machine instructions // - const MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI); - MachineCodeForBasicBlock::const_iterator MII = MIVec.begin(); + const MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI); + MachineBasicBlock::const_iterator MII = MIVec.begin(); // iterate over all the machine instructions in BB // @@ -420,8 +420,8 @@ void PhyRegAlloc::addInterferencesForArgs() { //----------------------------- inline void InsertBefore(MachineInstr* newMI, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator& MII) + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator& MII) { MII = MIVec.insert(MII, newMI); ++MII; @@ -429,8 +429,8 @@ InsertBefore(MachineInstr* newMI, inline void InsertAfter(MachineInstr* newMI, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator& MII) + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator& MII) { ++MII; // insert before the next instruction MII = MIVec.insert(MII, newMI); @@ -438,16 +438,16 @@ InsertAfter(MachineInstr* newMI, inline void SubstituteInPlace(MachineInstr* newMI, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator MII) + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator MII) { *MII = newMI; } inline void PrependInstructions(vector &IBef, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator& MII, + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator& MII, const std::string& msg) { if (!IBef.empty()) @@ -467,8 +467,8 @@ PrependInstructions(vector &IBef, inline void AppendInstructions(std::vector &IAft, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator& MII, + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator& MII, const std::string& msg) { if (!IAft.empty()) @@ -489,10 +489,10 @@ AppendInstructions(std::vector &IAft, void PhyRegAlloc::updateMachineCode() { - MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(&Meth->getEntryNode()); + MachineBasicBlock& MIVec = MachineBasicBlock::get(&Meth->getEntryNode()); // Insert any instructions needed at method entry - MachineCodeForBasicBlock::iterator MII = MIVec.begin(); + MachineBasicBlock::iterator MII = MIVec.begin(); PrependInstructions(AddedInstrAtEntry.InstrnsBefore, MIVec, MII, "At function entry: \n"); assert(AddedInstrAtEntry.InstrnsAfter.empty() && @@ -503,8 +503,8 @@ void PhyRegAlloc::updateMachineCode() BBI != BBE; ++BBI) { // iterate over all the machine instructions in BB - MachineCodeForBasicBlock &MIVec = MachineCodeForBasicBlock::get(BBI); - for (MachineCodeForBasicBlock::iterator MII = MIVec.begin(); + MachineBasicBlock &MIVec = MachineBasicBlock::get(BBI); + for (MachineBasicBlock::iterator MII = MIVec.begin(); MII != MIVec.end(); ++MII) { MachineInstr *MInst = *MII; @@ -958,8 +958,8 @@ void PhyRegAlloc::printMachineCode() cerr << "\n"; printLabel(BBI); cerr << ": "; // get the iterator for machine instructions - MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI); - MachineCodeForBasicBlock::iterator MII = MIVec.begin(); + MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI); + MachineBasicBlock::iterator MII = MIVec.begin(); // iterate over all the machine instructions in BB for ( ; MII != MIVec.end(); ++MII) { @@ -1039,7 +1039,7 @@ void PhyRegAlloc::printMachineCode() void PhyRegAlloc::colorIncomingArgs() { const BasicBlock &FirstBB = Meth->front(); - const MachineInstr *FirstMI = MachineCodeForBasicBlock::get(&FirstBB).front(); + const MachineInstr *FirstMI = MachineBasicBlock::get(&FirstBB).front(); assert(FirstMI && "No machine instruction in entry BB"); MRI.colorMethodArgs(Meth, LRI, &AddedInstrAtEntry); diff --git a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp index b88ac520178..07e6a467d18 100644 --- a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp +++ b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp @@ -8,7 +8,7 @@ #include "llvm/CodeGen/RegAllocCommon.h" #include "llvm/CodeGen/RegClass.h" #include "llvm/CodeGen/MachineInstr.h" -#include "llvm/CodeGen/MachineCodeForBasicBlock.h" +#include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Function.h" #include "llvm/BasicBlock.h" @@ -148,10 +148,10 @@ void LiveRangeInfo::constructLiveRanges() { // for (Function::const_iterator BBI=Meth->begin(); BBI != Meth->end(); ++BBI){ // get the vector of machine instructions for this basic block. - MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI); + MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI); // iterate over all the machine instructions in BB - for(MachineCodeForBasicBlock::iterator MInstIterator = MIVec.begin(); + for(MachineBasicBlock::iterator MInstIterator = MIVec.begin(); MInstIterator != MIVec.end(); ++MInstIterator) { MachineInstr *MInst = *MInstIterator; @@ -252,12 +252,11 @@ void LiveRangeInfo::coalesceLRs() BBI != BBE; ++BBI) { // get the iterator for machine instructions - const MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI); - MachineCodeForBasicBlock::const_iterator MInstIterator = MIVec.begin(); + const MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI); + MachineBasicBlock::const_iterator MInstIterator = MIVec.begin(); // iterate over all the machine instructions in BB for( ; MInstIterator != MIVec.end(); ++MInstIterator) { - const MachineInstr * MInst = *MInstIterator; if( DEBUG_RA >= RA_DEBUG_LiveRanges) { diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index 9899dbc71cc..cdb5d189943 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -9,7 +9,7 @@ #include "llvm/CodeGen/PhyRegAlloc.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineInstrAnnot.h" -#include "llvm/CodeGen/MachineCodeForBasicBlock.h" +#include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h" #include "llvm/Analysis/LoopInfo.h" @@ -275,8 +275,8 @@ void PhyRegAlloc::buildInterferenceGraphs() // get the iterator for machine instructions // - const MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI); - MachineCodeForBasicBlock::const_iterator MII = MIVec.begin(); + const MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI); + MachineBasicBlock::const_iterator MII = MIVec.begin(); // iterate over all the machine instructions in BB // @@ -420,8 +420,8 @@ void PhyRegAlloc::addInterferencesForArgs() { //----------------------------- inline void InsertBefore(MachineInstr* newMI, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator& MII) + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator& MII) { MII = MIVec.insert(MII, newMI); ++MII; @@ -429,8 +429,8 @@ InsertBefore(MachineInstr* newMI, inline void InsertAfter(MachineInstr* newMI, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator& MII) + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator& MII) { ++MII; // insert before the next instruction MII = MIVec.insert(MII, newMI); @@ -438,16 +438,16 @@ InsertAfter(MachineInstr* newMI, inline void SubstituteInPlace(MachineInstr* newMI, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator MII) + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator MII) { *MII = newMI; } inline void PrependInstructions(vector &IBef, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator& MII, + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator& MII, const std::string& msg) { if (!IBef.empty()) @@ -467,8 +467,8 @@ PrependInstructions(vector &IBef, inline void AppendInstructions(std::vector &IAft, - MachineCodeForBasicBlock& MIVec, - MachineCodeForBasicBlock::iterator& MII, + MachineBasicBlock& MIVec, + MachineBasicBlock::iterator& MII, const std::string& msg) { if (!IAft.empty()) @@ -489,10 +489,10 @@ AppendInstructions(std::vector &IAft, void PhyRegAlloc::updateMachineCode() { - MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(&Meth->getEntryNode()); + MachineBasicBlock& MIVec = MachineBasicBlock::get(&Meth->getEntryNode()); // Insert any instructions needed at method entry - MachineCodeForBasicBlock::iterator MII = MIVec.begin(); + MachineBasicBlock::iterator MII = MIVec.begin(); PrependInstructions(AddedInstrAtEntry.InstrnsBefore, MIVec, MII, "At function entry: \n"); assert(AddedInstrAtEntry.InstrnsAfter.empty() && @@ -503,8 +503,8 @@ void PhyRegAlloc::updateMachineCode() BBI != BBE; ++BBI) { // iterate over all the machine instructions in BB - MachineCodeForBasicBlock &MIVec = MachineCodeForBasicBlock::get(BBI); - for (MachineCodeForBasicBlock::iterator MII = MIVec.begin(); + MachineBasicBlock &MIVec = MachineBasicBlock::get(BBI); + for (MachineBasicBlock::iterator MII = MIVec.begin(); MII != MIVec.end(); ++MII) { MachineInstr *MInst = *MII; @@ -958,8 +958,8 @@ void PhyRegAlloc::printMachineCode() cerr << "\n"; printLabel(BBI); cerr << ": "; // get the iterator for machine instructions - MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI); - MachineCodeForBasicBlock::iterator MII = MIVec.begin(); + MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI); + MachineBasicBlock::iterator MII = MIVec.begin(); // iterate over all the machine instructions in BB for ( ; MII != MIVec.end(); ++MII) { @@ -1039,7 +1039,7 @@ void PhyRegAlloc::printMachineCode() void PhyRegAlloc::colorIncomingArgs() { const BasicBlock &FirstBB = Meth->front(); - const MachineInstr *FirstMI = MachineCodeForBasicBlock::get(&FirstBB).front(); + const MachineInstr *FirstMI = MachineBasicBlock::get(&FirstBB).front(); assert(FirstMI && "No machine instruction in entry BB"); MRI.colorMethodArgs(Meth, LRI, &AddedInstrAtEntry);