From 72270bb55c1979075460f3797bcafcbf4707edad Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 2 Aug 2017 12:11:50 +0000 Subject: [PATCH] Add missing probabilities in nvptx_lock{less,full}_update 2017-08-02 Tom de Vries Cesar Philippidis * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update): Add missing edge probabilities. Co-Authored-By: Cesar Philippidis From-SVN: r250823 --- gcc/ChangeLog | 6 ++++++ gcc/config/nvptx/nvptx.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6cd5ca7001b..8bed3d3d35b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-08-02 Tom de Vries + Cesar Philippidis + + * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update): + Add missing edge probabilities. + 2017-08-02 Tamar Christina * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int): diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 208b11555f2..0d21eb1406c 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -5072,7 +5072,9 @@ nvptx_lockless_update (location_t loc, gimple_stmt_iterator *gsi, *gsi = gsi_for_stmt (gsi_stmt (*gsi)); post_edge->flags ^= EDGE_TRUE_VALUE | EDGE_FALLTHRU; + post_edge->probability = profile_probability::even (); edge loop_edge = make_edge (loop_bb, loop_bb, EDGE_FALSE_VALUE); + loop_edge->probability = profile_probability::even (); set_immediate_dominator (CDI_DOMINATORS, loop_bb, pre_bb); set_immediate_dominator (CDI_DOMINATORS, post_bb, loop_bb); @@ -5145,7 +5147,9 @@ nvptx_lockfull_update (location_t loc, gimple_stmt_iterator *gsi, /* Create the lock loop ... */ locked_edge->flags ^= EDGE_TRUE_VALUE | EDGE_FALLTHRU; - make_edge (lock_bb, lock_bb, EDGE_FALSE_VALUE); + locked_edge->probability = profile_probability::even (); + edge loop_edge = make_edge (lock_bb, lock_bb, EDGE_FALSE_VALUE); + loop_edge->probability = profile_probability::even (); set_immediate_dominator (CDI_DOMINATORS, lock_bb, entry_bb); set_immediate_dominator (CDI_DOMINATORS, update_bb, lock_bb); -- 2.30.2