From: Chung-Ju Wu Date: Wed, 28 Mar 2018 13:26:42 +0000 (+0000) Subject: [NDS32] Adjust BRANCH_COST to prevent too much jump when compile with -Os. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15c193e2f5ce96026cc02828f4f91b1c9e832ea8;p=gcc.git [NDS32] Adjust BRANCH_COST to prevent too much jump when compile with -Os. gcc/ * config/nds32/nds32.h (BRANCH_COST): Adjust cost. From-SVN: r258921 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 69b715eb099..f7f37cb0717 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-03-27 Chung-Ju Wu + + * config/nds32/nds32.h (BRANCH_COST): Adjust cost. + 2018-03-27 Michael Meissner PR target/84914 diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h index 377606775bc..b12274ac25e 100644 --- a/gcc/config/nds32/nds32.h +++ b/gcc/config/nds32/nds32.h @@ -865,7 +865,7 @@ enum reg_class /* A C expression for the cost of a branch instruction. A value of 1 is the default; other values are interpreted relative to that. */ -#define BRANCH_COST(speed_p, predictable_p) ((speed_p) ? 2 : 0) +#define BRANCH_COST(speed_p, predictable_p) ((speed_p) ? 2 : 1) /* Override BRANCH_COST heuristic which empirically produces worse performance for removing short circuiting from the logical ops. */