No need to reserve space, erasing does not change the size of the container.

llvm-svn: 2201
This commit is contained in:
Chris Lattner 2002-04-09 18:01:21 +00:00
parent 46df9aec96
commit 99ac15d154
1 changed files with 0 additions and 1 deletions

View File

@ -661,7 +661,6 @@ RecordSchedule(const BasicBlock* bb, const SchedulingManager& S)
// Erase all except the dummy PHI instructions from mvec, and // Erase all except the dummy PHI instructions from mvec, and
// pre-allocate create space for the ones we will put back in. // pre-allocate create space for the ones we will put back in.
mvec.erase(I, mvec.end()); mvec.erase(I, mvec.end());
mvec.reserve(mvec.size() + S.isched.getNumInstructions());
InstrSchedule::const_iterator NIend = S.isched.end(); InstrSchedule::const_iterator NIend = S.isched.end();
for (InstrSchedule::const_iterator NI = S.isched.begin(); NI != NIend; ++NI) for (InstrSchedule::const_iterator NI = S.isched.begin(); NI != NIend; ++NI)