]> code.ossystems Code Review - openembedded-core.git/blob
9ff69b0c9251fd4d0d711af61b2d82a4ed4aaf00
[openembedded-core.git] /
1 Upstream-Status: Inappropriate [Backport]
2 From 5ff95d9c48276f6495b8ebefeb2ce4ac1ab6a1fe Mon Sep 17 00:00:00 2001
3 From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
4 Date: Wed, 20 Apr 2011 09:48:00 +0000
5 Subject: [PATCH 153/200] 2011-04-20  Richard Guenther  <rguenther@suse.de>
6
7         Backport from mainline
8         2011-04-19  Bernd Schmidt  <bernds@codesourcery.com>
9
10         PR fortran/47976
11         * reload1.c (inc_for_reload): Return void. All callers changed.
12         (emit_input_reload_insns): Don't try to delete previous output
13         reloads to a register, or record spill_reg_store for autoincs.
14
15
16 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172765 138bc75d-0d04-0410-961f-82ee72b054a4
17
18 index 3d58e58..5120315 100644
19 --- a/gcc/reload1.c
20 +++ b/gcc/reload1.c
21 @@ -445,7 +445,7 @@ static void emit_reload_insns (struct insn_chain *);
22  static void delete_output_reload (rtx, int, int, rtx);
23  static void delete_address_reloads (rtx, rtx);
24  static void delete_address_reloads_1 (rtx, rtx, rtx);
25 -static rtx inc_for_reload (rtx, rtx, rtx, int);
26 +static void inc_for_reload (rtx, rtx, rtx, int);
27  #ifdef AUTO_INC_DEC
28  static void add_auto_inc_notes (rtx, rtx);
29  #endif
30 @@ -7152,22 +7152,12 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
31  
32        old = XEXP (rl->in_reg, 0);
33  
34 -      if (optimize && REG_P (oldequiv)
35 -         && REGNO (oldequiv) < FIRST_PSEUDO_REGISTER
36 -         && spill_reg_store[REGNO (oldequiv)]
37 -         && REG_P (old)
38 -         && (dead_or_set_p (insn,
39 -                            spill_reg_stored_to[REGNO (oldequiv)])
40 -             || rtx_equal_p (spill_reg_stored_to[REGNO (oldequiv)],
41 -                             old)))
42 -       delete_output_reload (insn, j, REGNO (oldequiv), reloadreg);
43 -
44        /* Prevent normal processing of this reload.  */
45        special = 1;
46 -      /* Output a special code sequence for this case.  */
47 -      new_spill_reg_store[REGNO (reloadreg)]
48 -       = inc_for_reload (reloadreg, oldequiv, rl->out,
49 -                         rl->inc);
50 +      /* Output a special code sequence for this case, and forget about
51 +        spill reg information.  */
52 +      new_spill_reg_store[REGNO (reloadreg)] = NULL;
53 +      inc_for_reload (reloadreg, oldequiv, rl->out, rl->inc);
54      }
55  
56    /* If we are reloading a pseudo-register that was set by the previous
57 @@ -8981,11 +8971,9 @@ delete_address_reloads_1 (rtx dead_insn, rtx x, rtx current_insn)
58     IN is either identical to VALUE, or some cheaper place to reload from.
59  
60     INC_AMOUNT is the number to increment or decrement by (always positive).
61 -   This cannot be deduced from VALUE.
62 -
63 -   Return the instruction that stores into RELOADREG.  */
64 +   This cannot be deduced from VALUE.  */
65  
66 -static rtx
67 +static void
68  inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
69  {
70    /* REG or MEM to be copied and incremented.  */
71 @@ -8997,7 +8985,6 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
72    rtx inc;
73    rtx add_insn;
74    int code;
75 -  rtx store;
76    rtx real_in = in == value ? incloc : in;
77  
78    /* No hard register is equivalent to this register after
79 @@ -9045,9 +9032,8 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
80                  be used as an address.  */
81  
82               if (! post)
83 -               add_insn = emit_insn (gen_move_insn (reloadreg, incloc));
84 -
85 -             return add_insn;
86 +               emit_insn (gen_move_insn (reloadreg, incloc));
87 +             return;
88             }
89         }
90        delete_insns_since (last);
91 @@ -9063,7 +9049,7 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
92        if (in != reloadreg)
93         emit_insn (gen_move_insn (reloadreg, real_in));
94        emit_insn (gen_add2_insn (reloadreg, inc));
95 -      store = emit_insn (gen_move_insn (incloc, reloadreg));
96 +      emit_insn (gen_move_insn (incloc, reloadreg));
97      }
98    else
99      {
100 @@ -9077,14 +9063,12 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
101          the original value.  */
102  
103        emit_insn (gen_add2_insn (reloadreg, inc));
104 -      store = emit_insn (gen_move_insn (incloc, reloadreg));
105 +      emit_insn (gen_move_insn (incloc, reloadreg));
106        if (CONST_INT_P (inc))
107         emit_insn (gen_add2_insn (reloadreg, GEN_INT (-INTVAL (inc))));
108        else
109         emit_insn (gen_sub2_insn (reloadreg, inc));
110      }
111 -
112 -  return store;
113  }
114  \f
115  #ifdef AUTO_INC_DEC
116 -- 
117 1.7.0.4
118