summaryrefslogtreecommitdiff
path: root/gcc/omp-expand.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2017-08-06 09:56:38 +0000
committerTom de Vries <vries@gcc.gnu.org>2017-08-06 09:56:38 +0000
commit9fba2943f1e76245fda610fdb295b7077a5e799d (patch)
tree21822ae9d31791c9ddd50d2f615df7e540518ee7 /gcc/omp-expand.c
parentf38057cc118cca4a97eac5c3c5c7c15bee024799 (diff)
Add missing edge probabilities in expand_oacc_for, tile case
;; basic block 11, loop depth 2, freq 0, maybe hot ;; prev block 22, next block 23, flags: (NEW, REACHABLE) ;; pred: 22 (TRUE_VALUE) ;; 24 (TRUE_VALUE) ... if (.e_offset.15D.1971 < .e_bound.14D.1972) - goto <bb 23>; [100.00%] [count: INV] + goto <bb 23>; [80.01%] [count: INV] else - goto <bb 24>; [INV] [count: INV] + goto <bb 24>; [19.99%] [count: INV] ;; basic block 23, loop depth 3, freq 0, maybe hot ;; prev block 11, next block 24, flags: (NEW) ;; pred: 11 [always] (TRUE_VALUE) ;; 23 (TRUE_VALUE) ixD.1974 = .outer.4D.1967 + .e_offset.15D.1971; .e_offset.15D.1971 = .e_offset.15D.1971 + .e_step.16D.1973; if (.e_offset.15D.1971 < .e_bound.14D.1972) - goto <bb 23>; [INV] [count: INV] + goto <bb 23>; [80.01%] [count: INV] else - goto <bb 24>; [100.00%] [count: INV] + goto <bb 24>; [19.99%] [count: INV] 2017-08-06 Tom de Vries <tom@codesourcery.com> * omp-expand.c (expand_oacc_for): Add missing edge probability for tile and element loops. From-SVN: r250900
Diffstat (limited to 'gcc/omp-expand.c')
-rw-r--r--gcc/omp-expand.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c
index 5772bd9e4a3..0a0098af669 100644
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
@@ -5663,9 +5663,16 @@ expand_oacc_for (struct omp_region *region, struct omp_for_data *fd)
cont_bb = split->dest;
split->flags ^= EDGE_FALLTHRU | EDGE_FALSE_VALUE;
- make_edge (elem_cont_bb, elem_body_bb, EDGE_TRUE_VALUE);
+ split->probability = profile_probability::unlikely ().guessed ();
+ edge latch_edge
+ = make_edge (elem_cont_bb, elem_body_bb, EDGE_TRUE_VALUE);
+ latch_edge->probability = profile_probability::likely ().guessed ();
- make_edge (body_bb, cont_bb, EDGE_FALSE_VALUE);
+ edge skip_edge = make_edge (body_bb, cont_bb, EDGE_FALSE_VALUE);
+ skip_edge->probability = profile_probability::unlikely ().guessed ();
+ edge loop_entry_edge = EDGE_SUCC (body_bb, 1 - skip_edge->dest_idx);
+ loop_entry_edge->probability
+ = profile_probability::likely ().guessed ();
gsi = gsi_for_stmt (cont_stmt);
}