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