aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-28 01:41:27 +0000
committerChris Lattner <sabre@nondot.org>2002-10-28 01:41:27 +0000
commit32be9f6cd4e8803e169eee827afb548b85c24ace (patch)
tree58e980f7db10c872e15619b483088c20b5da67a3
parent92eba0c49b37412dc3fa8cdd8c8c85e0aa40f701 (diff)
downloadexternal_llvm-32be9f6cd4e8803e169eee827afb548b85c24ace.zip
external_llvm-32be9f6cd4e8803e169eee827afb548b85c24ace.tar.gz
external_llvm-32be9f6cd4e8803e169eee827afb548b85c24ace.tar.bz2
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4317 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/RegAlloc/LiveRangeInfo.cpp11
-rw-r--r--lib/CodeGen/RegAlloc/PhyRegAlloc.cpp40
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp11
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp40
4 files changed, 50 insertions, 52 deletions
diff --git a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
index b88ac52..07e6a46 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 9899dbc..cdb5d18 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<MachineInstr *> &IBef,
- MachineCodeForBasicBlock& MIVec,
- MachineCodeForBasicBlock::iterator& MII,
+ MachineBasicBlock& MIVec,
+ MachineBasicBlock::iterator& MII,
const std::string& msg)
{
if (!IBef.empty())
@@ -467,8 +467,8 @@ PrependInstructions(vector<MachineInstr *> &IBef,
inline void
AppendInstructions(std::vector<MachineInstr *> &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<MachineInstr *> &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 b88ac52..07e6a46 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 9899dbc..cdb5d18 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<MachineInstr *> &IBef,
- MachineCodeForBasicBlock& MIVec,
- MachineCodeForBasicBlock::iterator& MII,
+ MachineBasicBlock& MIVec,
+ MachineBasicBlock::iterator& MII,
const std::string& msg)
{
if (!IBef.empty())
@@ -467,8 +467,8 @@ PrependInstructions(vector<MachineInstr *> &IBef,
inline void
AppendInstructions(std::vector<MachineInstr *> &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<MachineInstr *> &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);