aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-12-04 00:03:30 +0000
committerChris Lattner <sabre@nondot.org>2001-12-04 00:03:30 +0000
commit7a1767520611d9ff6face702068de858e1cadf2c (patch)
tree84849800c5f0e86af2757f911bc65010e016259e /lib/CodeGen
parente9bb2df410f7a22decad9a883f7139d5857c1520 (diff)
Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator -> const_op_iterator Renamed PointerType::getValueType() -> PointerType::getElementType() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/InstrSched/SchedPriorities.cpp2
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelection.cpp3
-rw-r--r--lib/CodeGen/MachineInstr.cpp4
-rw-r--r--lib/CodeGen/RegAlloc/LiveRangeInfo.cpp6
-rw-r--r--lib/CodeGen/RegAlloc/PhyRegAlloc.cpp10
5 files changed, 12 insertions, 13 deletions
diff --git a/lib/CodeGen/InstrSched/SchedPriorities.cpp b/lib/CodeGen/InstrSched/SchedPriorities.cpp
index acbe552d05..1769707238 100644
--- a/lib/CodeGen/InstrSched/SchedPriorities.cpp
+++ b/lib/CodeGen/InstrSched/SchedPriorities.cpp
@@ -268,7 +268,7 @@ SchedPriorities::instructionHasLastUse(MethodLiveVarInfo& methodLiveVarInfo,
const LiveVarSet* liveVars =
methodLiveVarInfo.getLiveVarSetBeforeMInst(minstr, bb);
- for (MachineInstr::val_op_const_iterator vo(minstr); ! vo.done(); ++vo)
+ for (MachineInstr::val_const_op_iterator vo(minstr); ! vo.done(); ++vo)
if (liveVars->find(*vo) == liveVars->end())
{
hasLastUse = true;
diff --git a/lib/CodeGen/InstrSelection/InstrSelection.cpp b/lib/CodeGen/InstrSelection/InstrSelection.cpp
index d0a301ce5e..b959c90ca3 100644
--- a/lib/CodeGen/InstrSelection/InstrSelection.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelection.cpp
@@ -250,8 +250,7 @@ void InsertCode4AllPhisInMeth(Method *method, TargetMachine &target) {
PHINode *PN = (PHINode *) (*IIt);
- Value *PhiCpRes =
- new Value(PN->getType(), PN->getValueType() );
+ Value *PhiCpRes = new Value(PN->getType(), PN->getValueType());
string *Name = new string("PhiCp:");
(*Name) += (int) PhiCpRes;
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index de77f6ab6c..5832b8ed18 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -102,7 +102,7 @@ operator<< (ostream& os, const MachineInstr& minstr)
#undef DEBUG_VAL_OP_ITERATOR
#ifdef DEBUG_VAL_OP_ITERATOR
os << endl << "\tValue operands are: ";
- for (MachineInstr::val_op_const_iterator vo(&minstr); ! vo.done(); ++vo)
+ for (MachineInstr::val_const_op_iterator vo(&minstr); ! vo.done(); ++vo)
{
const Value* val = *vo;
os << val << (vo.isDef()? "(def), " : ", ");
@@ -218,7 +218,7 @@ ComputeMaxOptionalArgsSize(const TargetMachine& target, const Method* method)
unsigned int maxSize = 0;
- for (Method::inst_const_iterator I=method->inst_begin(),E=method->inst_end();
+ for (Method::const_inst_iterator I=method->inst_begin(),E=method->inst_end();
I != E; ++I)
if ((*I)->getOpcode() == Instruction::Call)
{
diff --git a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
index c07227539a..00385d99de 100644
--- a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
+++ b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
@@ -122,7 +122,7 @@ void LiveRangeInfo::constructLiveRanges()
// iterate over MI operands to find defs
- for( MachineInstr::val_op_const_iterator OpI(MInst);!OpI.done(); ++OpI) {
+ for( MachineInstr::val_const_op_iterator OpI(MInst);!OpI.done(); ++OpI) {
if( DEBUG_RA) {
MachineOperand::MachineOperandType OpTyp =
@@ -286,7 +286,7 @@ void LiveRangeInfo::coalesceLRs()
// iterate over MI operands to find defs
- for(MachineInstr::val_op_const_iterator DefI(MInst);!DefI.done();++DefI){
+ for(MachineInstr::val_const_op_iterator DefI(MInst);!DefI.done();++DefI){
if( DefI.isDef() ) { // iff this operand is a def
@@ -294,7 +294,7 @@ void LiveRangeInfo::coalesceLRs()
assert( LROfDef );
RegClass *const RCOfDef = LROfDef->getRegClass();
- MachineInstr::val_op_const_iterator UseI(MInst);
+ MachineInstr::val_const_op_iterator UseI(MInst);
for( ; !UseI.done(); ++UseI){ // for all uses
LiveRange *const LROfUse = getLiveRangeForValue( *UseI );
diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
index b7ca871b9c..240e8c1c2a 100644
--- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
@@ -262,7 +262,7 @@ void PhyRegAlloc::buildInterferenceGraphs()
// iterate over MI operands to find defs
- for( MachineInstr::val_op_const_iterator OpI(MInst);!OpI.done(); ++OpI) {
+ for( MachineInstr::val_const_op_iterator OpI(MInst);!OpI.done(); ++OpI) {
if( OpI.isDef() ) {
// create a new LR iff this operand is a def
@@ -318,7 +318,7 @@ void PhyRegAlloc::addInterf4PseudoInstr(const MachineInstr *MInst) {
bool setInterf = false;
// iterate over MI operands to find defs
- for( MachineInstr::val_op_const_iterator It1(MInst);!It1.done(); ++It1) {
+ for( MachineInstr::val_const_op_iterator It1(MInst);!It1.done(); ++It1) {
const LiveRange *const LROfOp1 = LRI.getLiveRangeForValue( *It1 );
@@ -327,7 +327,7 @@ void PhyRegAlloc::addInterf4PseudoInstr(const MachineInstr *MInst) {
//if( !LROfOp1 ) continue;
- MachineInstr::val_op_const_iterator It2 = It1;
+ MachineInstr::val_const_op_iterator It2 = It1;
++It2;
for( ; !It2.done(); ++It2) {
@@ -429,7 +429,7 @@ void PhyRegAlloc::updateMachineCode()
//mcInfo.popAllTempValues(TM);
// TODO ** : do later
- //for(MachineInstr::val_op_const_iterator OpI(MInst);!OpI.done();++OpI) {
+ //for(MachineInstr::val_const_op_iterator OpI(MInst);!OpI.done();++OpI) {
// Now replace set the registers for operands in the machine instruction
@@ -928,7 +928,7 @@ void PhyRegAlloc::printMachineCode()
cout << TargetInstrDescriptors[MInst->getOpCode()].opCodeString;
- //for(MachineInstr::val_op_const_iterator OpI(MInst);!OpI.done();++OpI) {
+ //for(MachineInstr::val_const_op_iterator OpI(MInst);!OpI.done();++OpI) {
for(unsigned OpNum=0; OpNum < MInst->getNumOperands(); ++OpNum) {