Use const reference instead of vector copying.
authorJakub Staszak <kubastaszak@gmail.com>
Fri, 25 Jan 2013 21:44:27 +0000 (21:44 +0000)
committerJakub Staszak <kubastaszak@gmail.com>
Fri, 25 Jan 2013 21:44:27 +0000 (21:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173497 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineScheduler.cpp

index 821a4f20272c837092a3f96bd62112c4b921f941..adf9a57ddebaa4a17363d2115e6fbfd640155520 100644 (file)
@@ -467,7 +467,8 @@ void ScheduleDAGMI::initRegPressure() {
   // Cache the list of excess pressure sets in this region. This will also track
   // the max pressure in the scheduled code for these sets.
   RegionCriticalPSets.clear();
-  std::vector<unsigned> RegionPressure = RPTracker.getPressure().MaxSetPressure;
+  const std::vector<unsigned> &RegionPressure =
+    RPTracker.getPressure().MaxSetPressure;
   for (unsigned i = 0, e = RegionPressure.size(); i < e; ++i) {
     unsigned Limit = TRI->getRegPressureSetLimit(i);
     DEBUG(dbgs() << TRI->getRegPressureSetName(i)