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
diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp
index acbe552..1769707 100644
--- a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp
+++ b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp
@@ -268,7 +268,7 @@
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 d0a301c..b959c90 100644
--- a/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp
+++ b/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp
@@ -250,8 +250,7 @@
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 09beb12..3f5d95d 100644
--- a/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp
+++ b/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp
@@ -39,7 +39,7 @@
}
// 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 @@
// 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 1ca65f0..bcc9de9 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 @@
}
- 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 @@
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 c072275..00385d9 100644
--- a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp
+++ b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp
@@ -122,7 +122,7 @@
// 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 @@
// 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 @@
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 b7ca871..240e8c1 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -262,7 +262,7 @@
// 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 @@
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 @@
//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 @@
//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 @@
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 385ffff..032faf1 100644
--- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
+++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
@@ -612,10 +612,10 @@
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 2439b98..c7b8ecb 100644
--- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp
+++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
@@ -771,7 +771,7 @@
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 @@
//
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 @@
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 @@
// 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 @@
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 @@
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 @@
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");
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index b11ef04..09bc600 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -151,7 +151,7 @@
unsigned Result = 0;
// Get the type pointed to...
- const Type *Ty = PtrTy->getValueType();
+ const Type *Ty = PtrTy->getElementType();
for (unsigned CurIDX = 0; CurIDX < Idx.size(); ++CurIDX) {
if (const StructType *STy = dyn_cast<const StructType>(Ty)) {