summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0153-2011-04-20-Richard-Guenther-rguenther-suse.de.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0153-2011-04-20-Richard-Guenther-rguenther-suse.de.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0153-2011-04-20-Richard-Guenther-rguenther-suse.de.patch117
1 files changed, 117 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0153-2011-04-20-Richard-Guenther-rguenther-suse.de.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0153-2011-04-20-Richard-Guenther-rguenther-suse.de.patch
new file mode 100644
index 000000000..e47d8d1b6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0153-2011-04-20-Richard-Guenther-rguenther-suse.de.patch
@@ -0,0 +1,117 @@
+From 5ff95d9c48276f6495b8ebefeb2ce4ac1ab6a1fe Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 20 Apr 2011 09:48:00 +0000
+Subject: [PATCH 153/200] 2011-04-20 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline
+ 2011-04-19 Bernd Schmidt <bernds@codesourcery.com>
+
+ PR fortran/47976
+ * reload1.c (inc_for_reload): Return void. All callers changed.
+ (emit_input_reload_insns): Don't try to delete previous output
+ reloads to a register, or record spill_reg_store for autoincs.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172765 138bc75d-0d04-0410-961f-82ee72b054a4
+
+index 3d58e58..5120315 100644
+--- a/gcc/reload1.c
++++ b/gcc/reload1.c
+@@ -445,7 +445,7 @@ static void emit_reload_insns (struct insn_chain *);
+ static void delete_output_reload (rtx, int, int, rtx);
+ static void delete_address_reloads (rtx, rtx);
+ static void delete_address_reloads_1 (rtx, rtx, rtx);
+-static rtx inc_for_reload (rtx, rtx, rtx, int);
++static void inc_for_reload (rtx, rtx, rtx, int);
+ #ifdef AUTO_INC_DEC
+ static void add_auto_inc_notes (rtx, rtx);
+ #endif
+@@ -7152,22 +7152,12 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
+
+ old = XEXP (rl->in_reg, 0);
+
+- if (optimize && REG_P (oldequiv)
+- && REGNO (oldequiv) < FIRST_PSEUDO_REGISTER
+- && spill_reg_store[REGNO (oldequiv)]
+- && REG_P (old)
+- && (dead_or_set_p (insn,
+- spill_reg_stored_to[REGNO (oldequiv)])
+- || rtx_equal_p (spill_reg_stored_to[REGNO (oldequiv)],
+- old)))
+- delete_output_reload (insn, j, REGNO (oldequiv), reloadreg);
+-
+ /* Prevent normal processing of this reload. */
+ special = 1;
+- /* Output a special code sequence for this case. */
+- new_spill_reg_store[REGNO (reloadreg)]
+- = inc_for_reload (reloadreg, oldequiv, rl->out,
+- rl->inc);
++ /* Output a special code sequence for this case, and forget about
++ spill reg information. */
++ new_spill_reg_store[REGNO (reloadreg)] = NULL;
++ inc_for_reload (reloadreg, oldequiv, rl->out, rl->inc);
+ }
+
+ /* If we are reloading a pseudo-register that was set by the previous
+@@ -8981,11 +8971,9 @@ delete_address_reloads_1 (rtx dead_insn, rtx x, rtx current_insn)
+ IN is either identical to VALUE, or some cheaper place to reload from.
+
+ INC_AMOUNT is the number to increment or decrement by (always positive).
+- This cannot be deduced from VALUE.
+-
+- Return the instruction that stores into RELOADREG. */
++ This cannot be deduced from VALUE. */
+
+-static rtx
++static void
+ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
+ {
+ /* REG or MEM to be copied and incremented. */
+@@ -8997,7 +8985,6 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
+ rtx inc;
+ rtx add_insn;
+ int code;
+- rtx store;
+ rtx real_in = in == value ? incloc : in;
+
+ /* No hard register is equivalent to this register after
+@@ -9045,9 +9032,8 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
+ be used as an address. */
+
+ if (! post)
+- add_insn = emit_insn (gen_move_insn (reloadreg, incloc));
+-
+- return add_insn;
++ emit_insn (gen_move_insn (reloadreg, incloc));
++ return;
+ }
+ }
+ delete_insns_since (last);
+@@ -9063,7 +9049,7 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
+ if (in != reloadreg)
+ emit_insn (gen_move_insn (reloadreg, real_in));
+ emit_insn (gen_add2_insn (reloadreg, inc));
+- store = emit_insn (gen_move_insn (incloc, reloadreg));
++ emit_insn (gen_move_insn (incloc, reloadreg));
+ }
+ else
+ {
+@@ -9077,14 +9063,12 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
+ the original value. */
+
+ emit_insn (gen_add2_insn (reloadreg, inc));
+- store = emit_insn (gen_move_insn (incloc, reloadreg));
++ emit_insn (gen_move_insn (incloc, reloadreg));
+ if (CONST_INT_P (inc))
+ emit_insn (gen_add2_insn (reloadreg, GEN_INT (-INTVAL (inc))));
+ else
+ emit_insn (gen_sub2_insn (reloadreg, inc));
+ }
+-
+- return store;
+ }
+
+ #ifdef AUTO_INC_DEC
+--
+1.7.0.4
+