[llvm] r185511 - Use SmallVectorImpl::iterator/const_iterator instead of SmallVector
Eric Christopher
echristo at gmail.com
Tue Jul 2 22:01:24 PDT 2013
Author: echristo
Date: Wed Jul 3 00:01:24 2013
New Revision: 185511
URL: http://llvm.org/viewvc/llvm-project?rev=185511&view=rev
Log:
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector
to avoid specifying the vector size.
Modified:
llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h
llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
Modified: llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h?rev=185511&r1=185510&r2=185511&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h (original)
+++ llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h Wed Jul 3 00:01:24 2013
@@ -131,7 +131,7 @@ public:
/// Query whether a frame index is a scavenging frame index.
bool isScavengingFrameIndex(int FI) const {
- for (SmallVector<ScavengedInfo, 2>::const_iterator I = Scavenged.begin(),
+ for (SmallVectorImpl<ScavengedInfo>::const_iterator I = Scavenged.begin(),
IE = Scavenged.end(); I != IE; ++I)
if (I->FrameIndex == FI)
return true;
@@ -141,7 +141,7 @@ public:
/// Get an array of scavenging frame indices.
void getScavengingFrameIndices(SmallVectorImpl<int> &A) const {
- for (SmallVector<ScavengedInfo, 2>::const_iterator I = Scavenged.begin(),
+ for (SmallVectorImpl<ScavengedInfo>::const_iterator I = Scavenged.begin(),
IE = Scavenged.end(); I != IE; ++I)
if (I->FrameIndex >= 0)
A.push_back(I->FrameIndex);
Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=185511&r1=185510&r2=185511&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Wed Jul 3 00:01:24 2013
@@ -263,10 +263,10 @@ namespace llvm {
SmallVector<SDep, 4> Preds; // All sunit predecessors.
SmallVector<SDep, 4> Succs; // All sunit successors.
- typedef SmallVector<SDep, 4>::iterator pred_iterator;
- typedef SmallVector<SDep, 4>::iterator succ_iterator;
- typedef SmallVector<SDep, 4>::const_iterator const_pred_iterator;
- typedef SmallVector<SDep, 4>::const_iterator const_succ_iterator;
+ typedef SmallVectorImpl<SDep>::iterator pred_iterator;
+ typedef SmallVectorImpl<SDep>::iterator succ_iterator;
+ typedef SmallVectorImpl<SDep>::const_iterator const_pred_iterator;
+ typedef SmallVectorImpl<SDep>::const_iterator const_succ_iterator;
unsigned NodeNum; // Entry # of node in the node vector.
unsigned NodeQueueId; // Queue id of node.
More information about the llvm-commits
mailing list