diff options
author | Chris Lattner <sabre@nondot.org> | 2001-12-04 00:03:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-12-04 00:03:30 +0000 |
commit | 7a1767520611d9ff6face702068de858e1cadf2c (patch) | |
tree | 84849800c5f0e86af2757f911bc65010e016259e /lib/Target/SparcV9 | |
parent | e9bb2df410f7a22decad9a883f7139d5857c1520 (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/Target/SparcV9')
-rw-r--r-- | lib/Target/SparcV9/InstrSched/SchedPriorities.cpp | 2 | ||||
-rw-r--r-- | lib/Target/SparcV9/InstrSelection/InstrSelection.cpp | 3 | ||||
-rw-r--r-- | lib/Target/SparcV9/LiveVar/BBLiveVar.cpp | 4 | ||||
-rw-r--r-- | lib/Target/SparcV9/LiveVar/LiveVarSet.cpp | 6 | ||||
-rw-r--r-- | lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp | 6 | ||||
-rw-r--r-- | lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 10 | ||||
-rw-r--r-- | lib/Target/SparcV9/SparcV9AsmPrinter.cpp | 4 | ||||
-rw-r--r-- | lib/Target/SparcV9/SparcV9InstrSelection.cpp | 16 |
8 files changed, 25 insertions, 26 deletions
diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp index acbe552d05..1769707238 100644 --- a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp +++ b/lib/Target/SparcV9/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/Target/SparcV9/InstrSelection/InstrSelection.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp index d0a301ce5e..b959c90ca3 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp +++ b/lib/Target/SparcV9/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/Target/SparcV9/LiveVar/BBLiveVar.cpp b/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp index 09beb12b08..3f5d95d39e 100644 --- a/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp +++ b/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp @@ -39,7 +39,7 @@ void BBLiveVar::calcDefUseSets() } // 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() ) // add to Defs only if this operand is a def addDef( *OpI ); @@ -56,7 +56,7 @@ void BBLiveVar::calcDefUseSets() // iterate over MI operands to find uses - for(MachineInstr::val_op_const_iterator OpI(MInst); !OpI.done() ; ++OpI) { + for (MachineInstr::val_const_op_iterator OpI(MInst); !OpI.done() ; ++OpI) { const Value *Op = *OpI; if ( ((Op)->getType())->isLabelType() ) diff --git a/lib/Target/SparcV9/LiveVar/LiveVarSet.cpp b/lib/Target/SparcV9/LiveVar/LiveVarSet.cpp index 1ca65f0a4b..bcc9de9568 100644 --- a/lib/Target/SparcV9/LiveVar/LiveVarSet.cpp +++ b/lib/Target/SparcV9/LiveVar/LiveVarSet.cpp @@ -12,7 +12,7 @@ void LiveVarSet::applyTranferFuncForMInst(const MachineInstr *const MInst) { - 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() ) // kill only if this operand is a def remove(*OpI); // this definition kills any uses @@ -25,7 +25,7 @@ void LiveVarSet::applyTranferFuncForMInst(const MachineInstr *const MInst) } - for( MachineInstr::val_op_const_iterator OpI(MInst); !OpI.done() ; OpI++) { + for( MachineInstr::val_const_op_iterator OpI(MInst); !OpI.done() ; OpI++) { if ( ((*OpI)->getType())->isLabelType()) continue; // don't process labels @@ -50,7 +50,7 @@ void LiveVarSet::applyTranferFuncForInst(const Instruction *const Inst) if( Inst->isDefinition() ) { // add to Defs iff this instr is a definition remove(Inst); // this definition kills any uses } - Instruction::op_const_iterator OpI = Inst->op_begin(); // get operand iterat + Instruction::const_op_iterator OpI = Inst->op_begin(); // get operand iterat for( ; OpI != Inst->op_end() ; OpI++) { // iterate over operands if ( ((*OpI)->getType())->isLabelType()) continue; // don't process labels diff --git a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp index c07227539a..00385d99de 100644 --- a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp +++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index b7ca871b9c..240e8c1c2a 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/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) { diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp index 385ffffe56..032faf12d6 100644 --- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp +++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp @@ -612,10 +612,10 @@ SparcAsmPrinter::printGlobalVariable(const GlobalVariable* GV) printConstant(GV->getInitializer(), getID(GV)); else { toAsm << "\t.align\t" - << TypeToAlignment(GV->getType()->getValueType(), Target) << endl; + << TypeToAlignment(GV->getType()->getElementType(), Target) << endl; toAsm << "\t.type\t" << getID(GV) << ",#object" << endl; toAsm << "\t.reserve\t" << getID(GV) << "," - << TypeToSize(GV->getType()->getValueType(), Target) + << TypeToSize(GV->getType()->getElementType(), Target) << endl; } } diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp index 2439b9877c..c7b8ecb351 100644 --- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp +++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp @@ -771,7 +771,7 @@ SetOperandsForMemInstr(MachineInstr* minstr, newIdxVec->insert(newIdxVec->end(), idxVec->begin(), idxVec->end()); idxVec = newIdxVec; - assert(! ((PointerType*)ptrVal->getType())->getValueType()->isArrayType() + assert(!((PointerType*)ptrVal->getType())->getElementType()->isArrayType() && "GetElemPtr cannot be folded into array refs in selection"); } else @@ -782,7 +782,7 @@ SetOperandsForMemInstr(MachineInstr* minstr, // ptrVal = memInst->getPointerOperand(); - const Type* opType = cast<PointerType>(ptrVal->getType())->getValueType(); + const Type* opType = cast<PointerType>(ptrVal->getType())->getElementType(); if (opType->isArrayType()) { assert((memInst->getNumOperands() @@ -826,7 +826,7 @@ SetMemOperands_Internal(MachineInstr* minstr, const PointerType* ptrType = (PointerType*) ptrVal->getType(); - if (ptrType->getValueType()->isStructType()) + if (ptrType->getElementType()->isStructType()) { // the offset is always constant for structs isConstantOffset = true; @@ -839,7 +839,7 @@ SetMemOperands_Internal(MachineInstr* minstr, // It must be an array ref. Check if the offset is a constant, // and that the indexing has been lowered to a single offset. // - assert(ptrType->getValueType()->isArrayType()); + assert(ptrType->getElementType()->isArrayType()); assert(arrayOffsetVal != NULL && "Expect to be given Value* for array offsets"); @@ -1835,7 +1835,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, cast<GetElementPtrInst>(subtreeRoot->getInstruction()); const PointerType* ptrType = cast<PointerType>(getElemInst->getPointerOperand()->getType()); - if (! ptrType->getValueType()->isArrayType()) + if (! ptrType->getElementType()->isArrayType()) {// we don't need a separate instr numInstr = 0; // don't forward operand! break; @@ -1853,7 +1853,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, const PointerType* instrType = (const PointerType*) instr->getType(); assert(instrType->isPointerType()); int tsize = (int) - target.findOptimalStorageSize(instrType->getValueType()); + target.findOptimalStorageSize(instrType->getElementType()); assert(tsize != 0 && "Just to check when this can happen"); Method* method = instr->getParent()->getParent(); @@ -1881,9 +1881,9 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, Instruction* instr = subtreeRoot->getInstruction(); const PointerType* instrType = (const PointerType*) instr->getType(); assert(instrType->isPointerType() && - instrType->getValueType()->isArrayType()); + instrType->getElementType()->isArrayType()); const Type* eltType = - ((ArrayType*) instrType->getValueType())->getElementType(); + ((ArrayType*) instrType->getElementType())->getElementType(); int tsize = (int) target.findOptimalStorageSize(eltType); assert(tsize != 0 && "Just to check when this can happen"); |