From a2054420bcc321f13e17b3b76fcdc23c6fbc2457 Mon Sep 17 00:00:00 2001 From: vries Date: Sun, 6 Aug 2017 09:56:25 +0000 Subject: Add missing edge probability in expand_oacc_for ;; 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 ; [INV] [count: INV] + goto ; [80.01%] [count: INV] else - goto ; [100.00%] [count: INV] + goto ; [19.99%] [count: INV] 2017-08-06 Tom de Vries * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250899 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/omp-expand.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea3b2e327bd..c06ef3f3633 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-08-06 Tom de Vries + + * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk + loop. + 2017-08-04 Yury Gribov PR tree-optimization/57371 diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 970e04f71f8..5772bd9e4a3 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -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 (); } } -- cgit v1.2.1