comparison gcc/tree-ssa-sink.c @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 84e7813d76e9
children 1830386684a0
comparison
equal deleted inserted replaced
130:e108057fa461 132:d34655255c78
1 /* Code sinking for trees 1 /* Code sinking for trees
2 Copyright (C) 2001-2017 Free Software Foundation, Inc. 2 Copyright (C) 2001-2018 Free Software Foundation, Inc.
3 Contributed by Daniel Berlin <dan@dberlin.org> 3 Contributed by Daniel Berlin <dan@dberlin.org>
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify 7 GCC is free software; you can redistribute it and/or modify
224 } 224 }
225 225
226 /* If BEST_BB is at the same nesting level, then require it to have 226 /* If BEST_BB is at the same nesting level, then require it to have
227 significantly lower execution frequency to avoid gratutious movement. */ 227 significantly lower execution frequency to avoid gratutious movement. */
228 if (bb_loop_depth (best_bb) == bb_loop_depth (early_bb) 228 if (bb_loop_depth (best_bb) == bb_loop_depth (early_bb)
229 && best_bb->frequency < (early_bb->frequency * threshold / 100.0)) 229 /* If result of comparsion is unknown, preffer EARLY_BB.
230 Thus use !(...>=..) rather than (...<...) */
231 && !(best_bb->count.apply_scale (100, 1)
232 > (early_bb->count.apply_scale (threshold, 1))))
230 return best_bb; 233 return best_bb;
231 234
232 /* No better block found, so return EARLY_BB, which happens to be the 235 /* No better block found, so return EARLY_BB, which happens to be the
233 statement's original block. */ 236 statement's original block. */
234 return early_bb; 237 return early_bb;