aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChung-Ju Wu <jasonwucj@gmail.com>2018-03-28 13:26:42 +0000
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>2018-03-28 13:26:42 +0000
commit15c193e2f5ce96026cc02828f4f91b1c9e832ea8 (patch)
tree34da37a95b5bd3589ac945e5d92cb8974a153a18
parent7ee4f6f3ec4c51221a8fc44f98f5da4c95f779ae (diff)
downloadgcc-15c193e2f5ce96026cc02828f4f91b1c9e832ea8.zip
gcc-15c193e2f5ce96026cc02828f4f91b1c9e832ea8.tar.gz
gcc-15c193e2f5ce96026cc02828f4f91b1c9e832ea8.tar.bz2
[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
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/nds32/nds32.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 69b715e..f7f37cb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
+
+ * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
+
2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/84914
diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h
index 3776067..b12274a 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. */