[llvm] r185514 - Use SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the vector size.
Craig Topper
craig.topper at gmail.com
Tue Jul 2 22:18:47 PDT 2013
Author: ctopper
Date: Wed Jul 3 00:18:47 2013
New Revision: 185514
URL: http://llvm.org/viewvc/llvm-project?rev=185514&view=rev
Log:
Use SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the vector size.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=185514&r1=185513&r2=185514&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jul 3 00:18:47 2013
@@ -2763,8 +2763,8 @@ SelectCodeCommon(SDNode *NodeToMatch, co
bool mayStore = MCID.mayStore();
unsigned NumMemRefs = 0;
- for (SmallVector<MachineMemOperand*, 2>::const_iterator I =
- MatchedMemRefs.begin(), E = MatchedMemRefs.end(); I != E; ++I) {
+ for (SmallVectorImpl<MachineMemOperand *>::const_iterator I =
+ MatchedMemRefs.begin(), E = MatchedMemRefs.end(); I != E; ++I) {
if ((*I)->isLoad()) {
if (mayLoad)
++NumMemRefs;
@@ -2780,8 +2780,8 @@ SelectCodeCommon(SDNode *NodeToMatch, co
MF->allocateMemRefsArray(NumMemRefs);
MachineSDNode::mmo_iterator MemRefsPos = MemRefs;
- for (SmallVector<MachineMemOperand*, 2>::const_iterator I =
- MatchedMemRefs.begin(), E = MatchedMemRefs.end(); I != E; ++I) {
+ for (SmallVectorImpl<MachineMemOperand *>::const_iterator I =
+ MatchedMemRefs.begin(), E = MatchedMemRefs.end(); I != E; ++I) {
if ((*I)->isLoad()) {
if (mayLoad)
*MemRefsPos++ = *I;
More information about the llvm-commits
mailing list