]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add missing edge probability in expand_oacc_for
authorTom de Vries <tom@codesourcery.com>
Sun, 6 Aug 2017 09:56:25 +0000 (09:56 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Sun, 6 Aug 2017 09:56:25 +0000 (09:56 +0000)
 ;;   basic block 10, loop depth 1, freq 0, maybe hot
 ;;    prev block 9, next block 19, flags: (NEW, REACHABLE)
 ;;    pred:       18 (FALSE_VALUE)
 ;;                9 (FALSE_VALUE)
   GIMPLE_NOP
   .chunk_no.7D.1948 = .chunk_no.7D.1948 + 1;
   if (.chunk_no.7D.1948 < .chunk_max.6D.1949)
-    goto <bb 18>; [INV] [count: INV]
+    goto <bb 18>; [80.01%] [count: INV]
   else
-    goto <bb 19>; [100.00%] [count: INV]
+    goto <bb 19>; [19.99%] [count: INV]

2017-08-06  Tom de Vries  <tom@codesourcery.com>

* omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
loop.

From-SVN: r250899

gcc/ChangeLog
gcc/omp-expand.c

index ea3b2e327bde420d5895e25125dd2254f06decb4..c06ef3f3633c3a1ea2dadd293e98d7dc6fa9072c 100644 (file)
@@ -1,3 +1,8 @@
+2017-08-06  Tom de Vries  <tom@codesourcery.com>
+
+       * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
+       loop.
+
 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
 
        PR tree-optimization/57371
index 970e04f71f8f1019474f47987ca8723a6c3d3575..5772bd9e4a3a50a43088b89ac8ec028c6977a98d 100644 (file)
@@ -5718,7 +5718,9 @@ expand_oacc_for (struct omp_region *region, struct omp_for_data *fd)
 
          /* Fixup edges from bottom_bb.  */
          split->flags ^= EDGE_FALLTHRU | EDGE_FALSE_VALUE;
-         make_edge (bottom_bb, head_bb, EDGE_TRUE_VALUE);
+         split->probability = profile_probability::unlikely ().guessed ();
+         edge latch_edge = make_edge (bottom_bb, head_bb, EDGE_TRUE_VALUE);
+         latch_edge->probability = profile_probability::likely ().guessed ();
        }
     }