do not collect cold loops in scops
authorAditya Kumar <aditya.k7@samsung.com>
Fri, 6 Nov 2015 20:43:52 +0000 (20:43 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Fri, 6 Nov 2015 20:43:52 +0000 (20:43 +0000)
           * graphite-scop-detection.c (loop_is_valid_scop): Call
           optimize_loop_nest_for_speed_p.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r229890

gcc/ChangeLog
gcc/graphite-scop-detection.c

index 04bc2b4965953b78d8a80991553ffcde0bd9f4f1..c5c9eedd864274193f7a7f5b619d5d8a7525340c 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-06  Aditya Kumar  <aditya.k7@samsung.com>
+           Sebastian Pop  <s.pop@samsung.com>
+
+       * graphite-scop-detection.c (loop_is_valid_scop): Call
+       optimize_loop_nest_for_speed_p.
+
 2015-11-06  Aditya Kumar  <aditya.k7@samsung.com>
            Sebastian Pop  <s.pop@samsung.com>
 
index b1f2ebc20a23dd29accf0c3c83d179ff139ac1c9..9fb8264550189ed8ac84a9dee3f104be510119e4 100644 (file)
@@ -959,6 +959,13 @@ scop_detection::loop_is_valid_scop (loop_p loop, sese_l scop) const
   if (!scop)
     return false;
 
+  if (!optimize_loop_nest_for_speed_p (loop))
+    {
+      DEBUG_PRINT (dp << "[scop-detection-fail] loop_"
+                     << loop->num << " is not on a hot path.\n");
+      return false;
+    }
+
   if (!can_represent_loop (loop, scop))
     {
       DEBUG_PRINT (dp << "[scop-detection-fail] cannot represent loop_"