aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@freesoft.cz>1999-10-01 03:35:37 +0200
committerRichard Henderson <rth@gcc.gnu.org>1999-09-30 18:35:37 -0700
commit9b00189f0924102bbc2d96792d8136d200ff552a (patch)
treebad8e83250d92067fef30874a6094d0e7cbdef5d
parent0d7148e3f20bd99e7053e5307aa511229a6820b7 (diff)
downloadgcc-9b00189f0924102bbc2d96792d8136d200ff552a.zip
gcc-9b00189f0924102bbc2d96792d8136d200ff552a.tar.gz
gcc-9b00189f0924102bbc2d96792d8136d200ff552a.tar.bz2
Jan Hubicka <hubicka@freesoft.cz>
* i386.c (ix86_adjust_cost): Ignore false ebp dependencies in prologues. From-SVN: r29745
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c14
2 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e34536b..f6ef56a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sep 30 18:34:54 1999 Jan Hubicka <hubicka@freesoft.cz>
+
+ * i386.c (ix86_adjust_cost): Ignore false ebp dependencies in
+ prologues.
+
Thu Sep 30 18:31:36 1999 Jan Hubicka <hubicka@freesoft.cz>
* alias.c: Include insn-flags.h.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 34a68a7..69b1170 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5325,15 +5325,27 @@ ix86_adjust_cost (insn, link, dep_insn, cost)
{
enum attr_type insn_type, dep_insn_type;
rtx set, set2;
+ int dep_insn_code_number;
/* We describe no anti or output depenancies. */
if (REG_NOTE_KIND (link) != 0)
return cost;
+ dep_insn_code_number = recog_memoized (dep_insn);
+
/* If we can't recognize the insns, we can't really do anything. */
- if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0)
+ if (dep_insn_code_number < 0 || recog_memoized (insn) < 0)
return cost;
+ /* Prologue and epilogue allocators have false dependency on ebp.
+ This results in one cycle extra stall on Pentium prologue scheduling, so
+ handle this important case manually. */
+
+ if ((dep_insn_code_number == CODE_FOR_prologue_allocate_stack
+ || dep_insn_code_number == CODE_FOR_epilogue_deallocate_stack)
+ && !reg_mentioned_p (stack_pointer_rtx, insn))
+ return 0;
+
insn_type = get_attr_type (insn);
dep_insn_type = get_attr_type (dep_insn);