mem: Avoid setting markPending if not needed
authorAndreas Hansson <andreas.hansson@arm.com>
Fri, 4 Sep 2015 17:14:03 +0000 (13:14 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Fri, 4 Sep 2015 17:14:03 +0000 (13:14 -0400)
In cases where a newly added target does not have any upstream MSHR to
mark as downstreamPending, remember that nothing is marked. This
allows us to avoid attempting to find the MSHR as part of the clearing
of downstreamPending.

src/mem/cache/mshr.cc

index 5b7eb0c06474198aa3fe1b8a46781a3d67cc0df7..085b8dae0d04763f1b6bef01d18bfe53ce937ed3 100644 (file)
@@ -101,6 +101,9 @@ MSHR::TargetList::add(PacketPtr pkt, Tick readyTime,
         if (mshr != NULL) {
             assert(!mshr->downstreamPending);
             mshr->downstreamPending = true;
+        } else {
+            // No need to clear downstreamPending later
+            markPending = false;
         }
     }