aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.h
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2019-10-02 18:37:12 +0300
committerAlexander Monakov <amonakov@gcc.gnu.org>2019-10-02 18:37:12 +0300
commit1764d63bd98c6c08e993f5c39dfa0247985b1642 (patch)
tree8afecb03e7053f721f894c1ca4ab7fa0bc95928e /gcc/ifcvt.h
parenta264ea9a5bbbbf78ea8c53b675584d1f218e20db (diff)
downloadgcc-1764d63bd98c6c08e993f5c39dfa0247985b1642.zip
gcc-1764d63bd98c6c08e993f5c39dfa0247985b1642.tar.gz
gcc-1764d63bd98c6c08e993f5c39dfa0247985b1642.tar.bz2
ifcvt: improve cost estimation (PR 87047)
PR rtl-optimization/87047 * ifcvt.c (average_cost): New static function. Use it... (noce_process_if_block): ... here. testsuite/ * gcc.dg/pr87047.c: New test. From-SVN: r276466
Diffstat (limited to 'gcc/ifcvt.h')
-rw-r--r--gcc/ifcvt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ifcvt.h b/gcc/ifcvt.h
index 153ad96..40ad744 100644
--- a/gcc/ifcvt.h
+++ b/gcc/ifcvt.h
@@ -97,8 +97,8 @@ struct noce_if_info
/* An estimate of the original costs. When optimizing for size, this is the
combined cost of COND, JUMP and the costs for THEN_BB and ELSE_BB.
- When optimizing for speed, we use the costs of COND plus the minimum of
- the costs for THEN_BB and ELSE_BB, as computed in the next field. */
+ When optimizing for speed, we use the costs of COND plus weighted average
+ of the costs for THEN_BB and ELSE_BB, as computed in the next field. */
unsigned int original_cost;
/* Maximum permissible cost for the unconditional sequence we should