aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Demetriou <cgd@broadcom.com>2004-05-04 23:57:42 +0000
committerChris Demetriou <cgd@gcc.gnu.org>2004-05-04 16:57:42 -0700
commit6fc8a30a41b42eab1cac59952a7d9b0515a091f7 (patch)
tree37d43480e677291eb34de4571212734b61fd9071
parent2225a42a9eb6321a92b2112a676683b12ab01b85 (diff)
downloadgcc-6fc8a30a41b42eab1cac59952a7d9b0515a091f7.zip
gcc-6fc8a30a41b42eab1cac59952a7d9b0515a091f7.tar.gz
gcc-6fc8a30a41b42eab1cac59952a7d9b0515a091f7.tar.bz2
mips.c (override_options): Default to no generation of branch-likely operations when...
2004-05-04 Chris Demetriou <cgd@broadcom.com> * config/mips/mips.c (override_options): Default to no generation of branch-likely operations when tuning for CPUs where they tend to have a negative performance impact (e.g., SB-1). From-SVN: r81494
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/mips/mips.c11
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e0510a9..7547050 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-04 Chris Demetriou <cgd@broadcom.com>
+
+ * config/mips/mips.c (override_options): Default to no
+ generation of branch-likely operations when tuning for
+ CPUs where they tend to have a negative performance impact
+ (e.g., SB-1).
+
2004-05-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (store_constructor_field): Don't call store_constructor
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index ccb2b3f..d26626c 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -4681,9 +4681,10 @@ override_options (void)
architecture.
By default, we enable use of Branch Likely instructions on
- all architectures which support them except for MIPS32 and MIPS64
- (i.e., the generic MIPS32 and MIPS64 ISAs, and processors which
- implement them).
+ all architectures which support them with the following
+ exceptions: when creating MIPS32 or MIPS64 code, and when
+ tuning for architectures where their use tends to hurt
+ performance.
The MIPS32 and MIPS64 architecture specifications say "Software
is strongly encouraged to avoid use of Branch Likely
@@ -4691,7 +4692,9 @@ override_options (void)
of the [MIPS32 and MIPS64] architecture." Therefore, we do not
issue those instructions unless instructed to do so by
-mbranch-likely. */
- if (ISA_HAS_BRANCHLIKELY && !(ISA_MIPS32 || ISA_MIPS32R2 || ISA_MIPS64))
+ if (ISA_HAS_BRANCHLIKELY
+ && !(ISA_MIPS32 || ISA_MIPS32R2 || ISA_MIPS64)
+ && !(TUNE_SB1))
target_flags |= MASK_BRANCHLIKELY;
else
target_flags &= ~MASK_BRANCHLIKELY;