mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-26 07:34:14 +00:00
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185540 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bf361f58df
commit
365ef0b197
@ -755,7 +755,7 @@ namespace llvm {
|
|||||||
bool addType(DIType DT);
|
bool addType(DIType DT);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef SmallVector<MDNode *, 8>::const_iterator iterator;
|
typedef SmallVectorImpl<MDNode *>::const_iterator iterator;
|
||||||
iterator compile_unit_begin() const { return CUs.begin(); }
|
iterator compile_unit_begin() const { return CUs.begin(); }
|
||||||
iterator compile_unit_end() const { return CUs.end(); }
|
iterator compile_unit_end() const { return CUs.end(); }
|
||||||
iterator subprogram_begin() const { return SPs.begin(); }
|
iterator subprogram_begin() const { return SPs.begin(); }
|
||||||
|
@ -1628,7 +1628,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops,
|
|||||||
// re-generate the operands list. Group the operands by constant scale,
|
// re-generate the operands list. Group the operands by constant scale,
|
||||||
// to avoid multiplying by the same constant scale multiple times.
|
// to avoid multiplying by the same constant scale multiple times.
|
||||||
std::map<APInt, SmallVector<const SCEV *, 4>, APIntCompare> MulOpLists;
|
std::map<APInt, SmallVector<const SCEV *, 4>, APIntCompare> MulOpLists;
|
||||||
for (SmallVector<const SCEV *, 8>::const_iterator I = NewOps.begin(),
|
for (SmallVectorImpl<const SCEV *>::const_iterator I = NewOps.begin(),
|
||||||
E = NewOps.end(); I != E; ++I)
|
E = NewOps.end(); I != E; ++I)
|
||||||
MulOpLists[M.find(*I)->second].push_back(*I);
|
MulOpLists[M.find(*I)->second].push_back(*I);
|
||||||
// Re-generate the operands list.
|
// Re-generate the operands list.
|
||||||
|
@ -704,7 +704,7 @@ Pass *PMTopLevelManager::findAnalysisPass(AnalysisID AID) {
|
|||||||
|
|
||||||
// Check the immutable passes. Iterate in reverse order so that we find
|
// Check the immutable passes. Iterate in reverse order so that we find
|
||||||
// the most recently registered passes first.
|
// the most recently registered passes first.
|
||||||
for (SmallVector<ImmutablePass *, 8>::reverse_iterator I =
|
for (SmallVectorImpl<ImmutablePass *>::reverse_iterator I =
|
||||||
ImmutablePasses.rbegin(), E = ImmutablePasses.rend(); I != E; ++I) {
|
ImmutablePasses.rbegin(), E = ImmutablePasses.rend(); I != E; ++I) {
|
||||||
AnalysisID PI = (*I)->getPassID();
|
AnalysisID PI = (*I)->getPassID();
|
||||||
if (PI == AID)
|
if (PI == AID)
|
||||||
@ -741,8 +741,8 @@ void PMTopLevelManager::dumpPasses() const {
|
|||||||
// (sometimes indirectly), but there's no inheritance relationship
|
// (sometimes indirectly), but there's no inheritance relationship
|
||||||
// between PMDataManager and Pass, so we have to getAsPass to get
|
// between PMDataManager and Pass, so we have to getAsPass to get
|
||||||
// from a PMDataManager* to a Pass*.
|
// from a PMDataManager* to a Pass*.
|
||||||
for (SmallVector<PMDataManager *, 8>::const_iterator I = PassManagers.begin(),
|
for (SmallVectorImpl<PMDataManager *>::const_iterator I =
|
||||||
E = PassManagers.end(); I != E; ++I)
|
PassManagers.begin(), E = PassManagers.end(); I != E; ++I)
|
||||||
(*I)->getAsPass()->dumpPassStructure(1);
|
(*I)->getAsPass()->dumpPassStructure(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -752,7 +752,7 @@ void PMTopLevelManager::dumpArguments() const {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
dbgs() << "Pass Arguments: ";
|
dbgs() << "Pass Arguments: ";
|
||||||
for (SmallVector<ImmutablePass *, 8>::const_iterator I =
|
for (SmallVectorImpl<ImmutablePass *>::const_iterator I =
|
||||||
ImmutablePasses.begin(), E = ImmutablePasses.end(); I != E; ++I)
|
ImmutablePasses.begin(), E = ImmutablePasses.end(); I != E; ++I)
|
||||||
if (const PassInfo *PI =
|
if (const PassInfo *PI =
|
||||||
PassRegistry::getPassRegistry()->getPassInfo((*I)->getPassID())) {
|
PassRegistry::getPassRegistry()->getPassInfo((*I)->getPassID())) {
|
||||||
@ -760,8 +760,8 @@ void PMTopLevelManager::dumpArguments() const {
|
|||||||
if (!PI->isAnalysisGroup())
|
if (!PI->isAnalysisGroup())
|
||||||
dbgs() << " -" << PI->getPassArgument();
|
dbgs() << " -" << PI->getPassArgument();
|
||||||
}
|
}
|
||||||
for (SmallVector<PMDataManager *, 8>::const_iterator I = PassManagers.begin(),
|
for (SmallVectorImpl<PMDataManager *>::const_iterator I =
|
||||||
E = PassManagers.end(); I != E; ++I)
|
PassManagers.begin(), E = PassManagers.end(); I != E; ++I)
|
||||||
(*I)->dumpPassArguments();
|
(*I)->dumpPassArguments();
|
||||||
dbgs() << "\n";
|
dbgs() << "\n";
|
||||||
}
|
}
|
||||||
|
@ -615,7 +615,7 @@ bool A15SDOptimizer::runOnInstruction(MachineInstr *MI) {
|
|||||||
SmallVector<unsigned, 8> Defs = getReadDPRs(MI);
|
SmallVector<unsigned, 8> Defs = getReadDPRs(MI);
|
||||||
bool Modified = false;
|
bool Modified = false;
|
||||||
|
|
||||||
for (SmallVector<unsigned, 8>::iterator I = Defs.begin(), E = Defs.end();
|
for (SmallVectorImpl<unsigned>::iterator I = Defs.begin(), E = Defs.end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
// Follow the def-use chain for this DPR through COPYs, and also through
|
// Follow the def-use chain for this DPR through COPYs, and also through
|
||||||
// PHIs (which are essentially multi-way COPYs). It is because of PHIs that
|
// PHIs (which are essentially multi-way COPYs). It is because of PHIs that
|
||||||
@ -630,7 +630,7 @@ bool A15SDOptimizer::runOnInstruction(MachineInstr *MI) {
|
|||||||
|
|
||||||
elideCopiesAndPHIs(Def, DefSrcs);
|
elideCopiesAndPHIs(Def, DefSrcs);
|
||||||
|
|
||||||
for (SmallVector<MachineInstr*, 8>::iterator II = DefSrcs.begin(),
|
for (SmallVectorImpl<MachineInstr *>::iterator II = DefSrcs.begin(),
|
||||||
EE = DefSrcs.end(); II != EE; ++II) {
|
EE = DefSrcs.end(); II != EE; ++II) {
|
||||||
MachineInstr *MI = *II;
|
MachineInstr *MI = *II;
|
||||||
|
|
||||||
@ -655,7 +655,7 @@ bool A15SDOptimizer::runOnInstruction(MachineInstr *MI) {
|
|||||||
|
|
||||||
if (NewReg != 0) {
|
if (NewReg != 0) {
|
||||||
Modified = true;
|
Modified = true;
|
||||||
for (SmallVector<MachineOperand*, 8>::const_iterator I = Uses.begin(),
|
for (SmallVectorImpl<MachineOperand *>::const_iterator I = Uses.begin(),
|
||||||
E = Uses.end(); I != E; ++I) {
|
E = Uses.end(); I != E; ++I) {
|
||||||
DEBUG(dbgs() << "Replacing operand "
|
DEBUG(dbgs() << "Replacing operand "
|
||||||
<< **I << " with "
|
<< **I << " with "
|
||||||
|
@ -437,7 +437,7 @@ bool MemDefsUses::hasHazard_(const MachineInstr &MI) {
|
|||||||
|
|
||||||
// Check underlying object list.
|
// Check underlying object list.
|
||||||
if (getUnderlyingObjects(MI, Objs)) {
|
if (getUnderlyingObjects(MI, Objs)) {
|
||||||
for (SmallVector<const Value *, 4>::const_iterator I = Objs.begin();
|
for (SmallVectorImpl<const Value *>::const_iterator I = Objs.begin();
|
||||||
I != Objs.end(); ++I)
|
I != Objs.end(); ++I)
|
||||||
HasHazard |= updateDefsUses(*I, MI.mayStore());
|
HasHazard |= updateDefsUses(*I, MI.mayStore());
|
||||||
|
|
||||||
@ -473,7 +473,7 @@ getUnderlyingObjects(const MachineInstr &MI,
|
|||||||
SmallVector<Value *, 4> Objs;
|
SmallVector<Value *, 4> Objs;
|
||||||
GetUnderlyingObjects(const_cast<Value *>(V), Objs);
|
GetUnderlyingObjects(const_cast<Value *>(V), Objs);
|
||||||
|
|
||||||
for (SmallVector<Value*, 4>::iterator I = Objs.begin(), E = Objs.end();
|
for (SmallVectorImpl<Value *>::iterator I = Objs.begin(), E = Objs.end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(*I)) {
|
if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(*I)) {
|
||||||
if (PSV->isAliased(MFI))
|
if (PSV->isAliased(MFI))
|
||||||
|
@ -282,7 +282,7 @@ namespace llvm {
|
|||||||
/// Return pointer to array of integer argument registers.
|
/// Return pointer to array of integer argument registers.
|
||||||
const uint16_t *intArgRegs() const;
|
const uint16_t *intArgRegs() const;
|
||||||
|
|
||||||
typedef SmallVector<ByValArgInfo, 2>::const_iterator byval_iterator;
|
typedef SmallVectorImpl<ByValArgInfo>::const_iterator byval_iterator;
|
||||||
byval_iterator byval_begin() const { return ByValArgs.begin(); }
|
byval_iterator byval_begin() const { return ByValArgs.begin(); }
|
||||||
byval_iterator byval_end() const { return ByValArgs.end(); }
|
byval_iterator byval_end() const { return ByValArgs.end(); }
|
||||||
|
|
||||||
|
@ -291,8 +291,8 @@ private:
|
|||||||
bool hasBackEdge(BlockT *curBlock);
|
bool hasBackEdge(BlockT *curBlock);
|
||||||
unsigned getLoopDepth (LoopT *LoopRep);
|
unsigned getLoopDepth (LoopT *LoopRep);
|
||||||
int countActiveBlock(
|
int countActiveBlock(
|
||||||
typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::const_iterator IterStart,
|
typename SmallVectorImpl<BlockT *>::const_iterator IterStart,
|
||||||
typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::const_iterator IterEnd);
|
typename SmallVectorImpl<BlockT *>::const_iterator IterEnd);
|
||||||
BlockT *findNearestCommonPostDom(std::set<BlockT *>&);
|
BlockT *findNearestCommonPostDom(std::set<BlockT *>&);
|
||||||
BlockT *findNearestCommonPostDom(BlockT *Block1, BlockT *Block2);
|
BlockT *findNearestCommonPostDom(BlockT *Block1, BlockT *Block2);
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ bool CFGStructurizer<PassT>::prepare(FuncT &func, PassT &pass,
|
|||||||
// Remove unconditional branch instr.
|
// Remove unconditional branch instr.
|
||||||
// Add dummy exit block iff there are multiple returns.
|
// Add dummy exit block iff there are multiple returns.
|
||||||
|
|
||||||
for (typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::const_iterator
|
for (typename SmallVectorImpl<BlockT *>::const_iterator
|
||||||
iterBlk = orderedBlks.begin(), iterEndBlk = orderedBlks.end();
|
iterBlk = orderedBlks.begin(), iterEndBlk = orderedBlks.end();
|
||||||
iterBlk != iterEndBlk;
|
iterBlk != iterEndBlk;
|
||||||
++iterBlk) {
|
++iterBlk) {
|
||||||
@ -441,12 +441,12 @@ bool CFGStructurizer<PassT>::run(FuncT &func, PassT &pass,
|
|||||||
<< ", numRemaintedBlk = " << numRemainedBlk << "\n";
|
<< ", numRemaintedBlk = " << numRemainedBlk << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::const_iterator
|
typename SmallVectorImpl<BlockT *>::const_iterator
|
||||||
iterBlk = orderedBlks.begin();
|
iterBlk = orderedBlks.begin();
|
||||||
typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::const_iterator
|
typename SmallVectorImpl<BlockT *>::const_iterator
|
||||||
iterBlkEnd = orderedBlks.end();
|
iterBlkEnd = orderedBlks.end();
|
||||||
|
|
||||||
typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::const_iterator
|
typename SmallVectorImpl<BlockT *>::const_iterator
|
||||||
sccBeginIter = iterBlk;
|
sccBeginIter = iterBlk;
|
||||||
BlockT *sccBeginBlk = NULL;
|
BlockT *sccBeginBlk = NULL;
|
||||||
int sccNumBlk = 0; // The number of active blocks, init to a
|
int sccNumBlk = 0; // The number of active blocks, init to a
|
||||||
@ -571,7 +571,7 @@ bool CFGStructurizer<PassT>::run(FuncT &func, PassT &pass,
|
|||||||
template<class PassT>
|
template<class PassT>
|
||||||
void CFGStructurizer<PassT>::printOrderedBlocks(llvm::raw_ostream &os) {
|
void CFGStructurizer<PassT>::printOrderedBlocks(llvm::raw_ostream &os) {
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::const_iterator
|
for (typename SmallVectorImpl<BlockT *>::const_iterator
|
||||||
iterBlk = orderedBlks.begin(), iterBlkEnd = orderedBlks.end();
|
iterBlk = orderedBlks.begin(), iterBlkEnd = orderedBlks.end();
|
||||||
iterBlk != iterBlkEnd;
|
iterBlk != iterBlkEnd;
|
||||||
++iterBlk, ++i) {
|
++iterBlk, ++i) {
|
||||||
@ -993,7 +993,7 @@ int CFGStructurizer<PassT>::loopcontPatternMatch(LoopT *loopRep,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::iterator
|
for (typename SmallVectorImpl<BlockT *>::iterator
|
||||||
iter = contBlk.begin(), iterEnd = contBlk.end();
|
iter = contBlk.begin(), iterEnd = contBlk.end();
|
||||||
iter != iterEnd; ++iter) {
|
iter != iterEnd; ++iter) {
|
||||||
(*iter)->removeSuccessor(loopHeader);
|
(*iter)->removeSuccessor(loopHeader);
|
||||||
@ -2082,7 +2082,7 @@ void CFGStructurizer<PassT>::addDummyExitBlock(SmallVector<BlockT*,
|
|||||||
funcRep->push_back(dummyExitBlk); //insert to function
|
funcRep->push_back(dummyExitBlk); //insert to function
|
||||||
CFGTraits::insertInstrEnd(dummyExitBlk, AMDGPU::RETURN, passRep);
|
CFGTraits::insertInstrEnd(dummyExitBlk, AMDGPU::RETURN, passRep);
|
||||||
|
|
||||||
for (typename SmallVector<BlockT *, DEFAULT_VEC_SLOTS>::iterator iter =
|
for (typename SmallVectorImpl<BlockT *>::iterator iter =
|
||||||
retBlks.begin(),
|
retBlks.begin(),
|
||||||
iterEnd = retBlks.end(); iter != iterEnd; ++iter) {
|
iterEnd = retBlks.end(); iter != iterEnd; ++iter) {
|
||||||
BlockT *curBlk = *iter;
|
BlockT *curBlk = *iter;
|
||||||
@ -2206,7 +2206,7 @@ CFGStructurizer<PassT>::recordLoopLandBlock(LoopT *loopRep, BlockT *landBlk,
|
|||||||
newLandBlk = funcRep->CreateMachineBasicBlock();
|
newLandBlk = funcRep->CreateMachineBasicBlock();
|
||||||
funcRep->push_back(newLandBlk); //insert to function
|
funcRep->push_back(newLandBlk); //insert to function
|
||||||
newLandBlk->addSuccessor(landBlk);
|
newLandBlk->addSuccessor(landBlk);
|
||||||
for (typename SmallVector<BlockT*, DEFAULT_VEC_SLOTS>::iterator iter =
|
for (typename SmallVectorImpl<BlockT *>::iterator iter =
|
||||||
inpathBlks.begin(),
|
inpathBlks.begin(),
|
||||||
iterEnd = inpathBlks.end(); iter != iterEnd; ++iter) {
|
iterEnd = inpathBlks.end(); iter != iterEnd; ++iter) {
|
||||||
BlockT *curBlk = *iter;
|
BlockT *curBlk = *iter;
|
||||||
@ -2370,8 +2370,8 @@ unsigned CFGStructurizer<PassT>::getLoopDepth(LoopT *loopRep) {
|
|||||||
|
|
||||||
template<class PassT>
|
template<class PassT>
|
||||||
int CFGStructurizer<PassT>::countActiveBlock
|
int CFGStructurizer<PassT>::countActiveBlock
|
||||||
(typename SmallVector<BlockT*, DEFAULT_VEC_SLOTS>::const_iterator iterStart,
|
(typename SmallVectorImpl<BlockT *>::const_iterator iterStart,
|
||||||
typename SmallVector<BlockT*, DEFAULT_VEC_SLOTS>::const_iterator iterEnd) {
|
typename SmallVectorImpl<BlockT *>::const_iterator iterEnd) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (iterStart != iterEnd) {
|
while (iterStart != iterEnd) {
|
||||||
if (!isRetiredBlock(*iterStart)) {
|
if (!isRetiredBlock(*iterStart)) {
|
||||||
|
@ -8837,7 +8837,7 @@ SDValue X86TargetLowering::LowerVectorAllZeroTest(SDValue Op,
|
|||||||
Opnds.push_back(N->getOperand(1));
|
Opnds.push_back(N->getOperand(1));
|
||||||
|
|
||||||
for (unsigned Slot = 0, e = Opnds.size(); Slot < e; ++Slot) {
|
for (unsigned Slot = 0, e = Opnds.size(); Slot < e; ++Slot) {
|
||||||
SmallVector<SDValue, 8>::const_iterator I = Opnds.begin() + Slot;
|
SmallVectorImpl<SDValue>::const_iterator I = Opnds.begin() + Slot;
|
||||||
// BFS traverse all OR'd operands.
|
// BFS traverse all OR'd operands.
|
||||||
if (I->getOpcode() == ISD::OR) {
|
if (I->getOpcode() == ISD::OR) {
|
||||||
Opnds.push_back(I->getOperand(0));
|
Opnds.push_back(I->getOperand(0));
|
||||||
|
@ -465,7 +465,7 @@ Instruction *MemCpyOpt::tryMergingIntoMemset(Instruction *StartInst,
|
|||||||
AMemSet->setDebugLoc(Range.TheStores[0]->getDebugLoc());
|
AMemSet->setDebugLoc(Range.TheStores[0]->getDebugLoc());
|
||||||
|
|
||||||
// Zap all the stores.
|
// Zap all the stores.
|
||||||
for (SmallVector<Instruction*, 16>::const_iterator
|
for (SmallVectorImpl<Instruction *>::const_iterator
|
||||||
SI = Range.TheStores.begin(),
|
SI = Range.TheStores.begin(),
|
||||||
SE = Range.TheStores.end(); SI != SE; ++SI) {
|
SE = Range.TheStores.end(); SI != SE; ++SI) {
|
||||||
MD->removeInstruction(*SI);
|
MD->removeInstruction(*SI);
|
||||||
|
@ -1301,7 +1301,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void updateDebugInfo(Instruction *Inst) const {
|
virtual void updateDebugInfo(Instruction *Inst) const {
|
||||||
for (SmallVector<DbgDeclareInst *, 4>::const_iterator I = DDIs.begin(),
|
for (SmallVectorImpl<DbgDeclareInst *>::const_iterator I = DDIs.begin(),
|
||||||
E = DDIs.end(); I != E; ++I) {
|
E = DDIs.end(); I != E; ++I) {
|
||||||
DbgDeclareInst *DDI = *I;
|
DbgDeclareInst *DDI = *I;
|
||||||
if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
|
if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
|
||||||
@ -1309,7 +1309,7 @@ public:
|
|||||||
else if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
|
else if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
|
||||||
ConvertDebugDeclareToDebugValue(DDI, LI, DIB);
|
ConvertDebugDeclareToDebugValue(DDI, LI, DIB);
|
||||||
}
|
}
|
||||||
for (SmallVector<DbgValueInst *, 4>::const_iterator I = DVIs.begin(),
|
for (SmallVectorImpl<DbgValueInst *>::const_iterator I = DVIs.begin(),
|
||||||
E = DVIs.end(); I != E; ++I) {
|
E = DVIs.end(); I != E; ++I) {
|
||||||
DbgValueInst *DVI = *I;
|
DbgValueInst *DVI = *I;
|
||||||
Value *Arg = 0;
|
Value *Arg = 0;
|
||||||
|
@ -1066,12 +1066,12 @@ public:
|
|||||||
|
|
||||||
LoadAndStorePromoter::run(Insts);
|
LoadAndStorePromoter::run(Insts);
|
||||||
AI->eraseFromParent();
|
AI->eraseFromParent();
|
||||||
for (SmallVector<DbgDeclareInst *, 4>::iterator I = DDIs.begin(),
|
for (SmallVectorImpl<DbgDeclareInst *>::iterator I = DDIs.begin(),
|
||||||
E = DDIs.end(); I != E; ++I) {
|
E = DDIs.end(); I != E; ++I) {
|
||||||
DbgDeclareInst *DDI = *I;
|
DbgDeclareInst *DDI = *I;
|
||||||
DDI->eraseFromParent();
|
DDI->eraseFromParent();
|
||||||
}
|
}
|
||||||
for (SmallVector<DbgValueInst *, 4>::iterator I = DVIs.begin(),
|
for (SmallVectorImpl<DbgValueInst *>::iterator I = DVIs.begin(),
|
||||||
E = DVIs.end(); I != E; ++I) {
|
E = DVIs.end(); I != E; ++I) {
|
||||||
DbgValueInst *DVI = *I;
|
DbgValueInst *DVI = *I;
|
||||||
DVI->eraseFromParent();
|
DVI->eraseFromParent();
|
||||||
@ -1086,7 +1086,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void updateDebugInfo(Instruction *Inst) const {
|
virtual void updateDebugInfo(Instruction *Inst) const {
|
||||||
for (SmallVector<DbgDeclareInst *, 4>::const_iterator I = DDIs.begin(),
|
for (SmallVectorImpl<DbgDeclareInst *>::const_iterator I = DDIs.begin(),
|
||||||
E = DDIs.end(); I != E; ++I) {
|
E = DDIs.end(); I != E; ++I) {
|
||||||
DbgDeclareInst *DDI = *I;
|
DbgDeclareInst *DDI = *I;
|
||||||
if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
|
if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
|
||||||
@ -1094,7 +1094,7 @@ public:
|
|||||||
else if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
|
else if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
|
||||||
ConvertDebugDeclareToDebugValue(DDI, LI, *DIB);
|
ConvertDebugDeclareToDebugValue(DDI, LI, *DIB);
|
||||||
}
|
}
|
||||||
for (SmallVector<DbgValueInst *, 4>::const_iterator I = DVIs.begin(),
|
for (SmallVectorImpl<DbgValueInst *>::const_iterator I = DVIs.begin(),
|
||||||
E = DVIs.end(); I != E; ++I) {
|
E = DVIs.end(); I != E; ++I) {
|
||||||
DbgValueInst *DVI = *I;
|
DbgValueInst *DVI = *I;
|
||||||
Value *Arg = NULL;
|
Value *Arg = NULL;
|
||||||
@ -2189,7 +2189,7 @@ void SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
|
|||||||
if (OtherPtr == AI || OtherPtr == NewElts[0]) {
|
if (OtherPtr == AI || OtherPtr == NewElts[0]) {
|
||||||
// This code will run twice for a no-op memcpy -- once for each operand.
|
// This code will run twice for a no-op memcpy -- once for each operand.
|
||||||
// Put only one reference to MI on the DeadInsts list.
|
// Put only one reference to MI on the DeadInsts list.
|
||||||
for (SmallVector<Value*, 32>::const_iterator I = DeadInsts.begin(),
|
for (SmallVectorImpl<Value *>::const_iterator I = DeadInsts.begin(),
|
||||||
E = DeadInsts.end(); I != E; ++I)
|
E = DeadInsts.end(); I != E; ++I)
|
||||||
if (*I == MI) return;
|
if (*I == MI) return;
|
||||||
DeadInsts.push_back(MI);
|
DeadInsts.push_back(MI);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user