summaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99436.patch
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99436.patch')
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99436.patch210
1 files changed, 0 insertions, 210 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99436.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99436.patch
deleted file mode 100644
index 1373b83ed7..0000000000
--- a/toolchain-layer/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99436.patch
+++ /dev/null
@@ -1,210 +0,0 @@
12010-11-24 Maxim Kuvyrkov <maxim@codesourcery.com>
2
3 gcc/
4 * combine.c (subst, combine_simlify_rtx): Add new argument, use it
5 to track processing of conditionals. Update all callers.
6 (try_combine, simplify_if_then_else): Update.
7
8=== modified file 'gcc/combine.c'
9Index: gcc-4_5-branch/gcc/combine.c
10===================================================================
11--- gcc-4_5-branch.orig/gcc/combine.c 2011-07-22 17:24:46.000000000 -0700
12+++ gcc-4_5-branch/gcc/combine.c 2011-07-22 17:34:41.961747206 -0700
13@@ -392,8 +392,8 @@
14 static void undo_all (void);
15 static void undo_commit (void);
16 static rtx *find_split_point (rtx *, rtx);
17-static rtx subst (rtx, rtx, rtx, int, int);
18-static rtx combine_simplify_rtx (rtx, enum machine_mode, int);
19+static rtx subst (rtx, rtx, rtx, int, int, int);
20+static rtx combine_simplify_rtx (rtx, enum machine_mode, int, int);
21 static rtx simplify_if_then_else (rtx);
22 static rtx simplify_set (rtx);
23 static rtx simplify_logical (rtx);
24@@ -2962,12 +2962,12 @@
25 if (i1)
26 {
27 subst_low_luid = DF_INSN_LUID (i1);
28- i1src = subst (i1src, pc_rtx, pc_rtx, 0, 0);
29+ i1src = subst (i1src, pc_rtx, pc_rtx, 0, 0, 0);
30 }
31 else
32 {
33 subst_low_luid = DF_INSN_LUID (i2);
34- i2src = subst (i2src, pc_rtx, pc_rtx, 0, 0);
35+ i2src = subst (i2src, pc_rtx, pc_rtx, 0, 0, 0);
36 }
37 }
38
39@@ -2978,7 +2978,7 @@
40 to avoid self-referential rtl. */
41
42 subst_low_luid = DF_INSN_LUID (i2);
43- newpat = subst (PATTERN (i3), i2dest, i2src, 0,
44+ newpat = subst (PATTERN (i3), i2dest, i2src, 0, 0,
45 ! i1_feeds_i3 && i1dest_in_i1src);
46 substed_i2 = 1;
47
48@@ -3009,7 +3009,7 @@
49
50 n_occurrences = 0;
51 subst_low_luid = DF_INSN_LUID (i1);
52- newpat = subst (newpat, i1dest, i1src, 0, 0);
53+ newpat = subst (newpat, i1dest, i1src, 0, 0, 0);
54 substed_i1 = 1;
55 }
56
57@@ -3071,7 +3071,7 @@
58 else
59 /* See comment where i2pat is assigned. */
60 XVECEXP (newpat, 0, --total_sets)
61- = subst (i2pat, i1dest, i1src, 0, 0);
62+ = subst (i2pat, i1dest, i1src, 0, 0, 0);
63 }
64 }
65
66@@ -4623,11 +4623,13 @@
67
68 IN_DEST is nonzero if we are processing the SET_DEST of a SET.
69
70+ IN_COND is nonzero if we are on top level of the condition.
71+
72 UNIQUE_COPY is nonzero if each substitution must be unique. We do this
73 by copying if `n_occurrences' is nonzero. */
74
75 static rtx
76-subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
77+subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy)
78 {
79 enum rtx_code code = GET_CODE (x);
80 enum machine_mode op0_mode = VOIDmode;
81@@ -4688,7 +4690,7 @@
82 && GET_CODE (XVECEXP (x, 0, 0)) == SET
83 && GET_CODE (SET_SRC (XVECEXP (x, 0, 0))) == ASM_OPERANDS)
84 {
85- new_rtx = subst (XVECEXP (x, 0, 0), from, to, 0, unique_copy);
86+ new_rtx = subst (XVECEXP (x, 0, 0), from, to, 0, 0, unique_copy);
87
88 /* If this substitution failed, this whole thing fails. */
89 if (GET_CODE (new_rtx) == CLOBBER
90@@ -4705,7 +4707,7 @@
91 && GET_CODE (dest) != CC0
92 && GET_CODE (dest) != PC)
93 {
94- new_rtx = subst (dest, from, to, 0, unique_copy);
95+ new_rtx = subst (dest, from, to, 0, 0, unique_copy);
96
97 /* If this substitution failed, this whole thing fails. */
98 if (GET_CODE (new_rtx) == CLOBBER
99@@ -4751,8 +4753,8 @@
100 }
101 else
102 {
103- new_rtx = subst (XVECEXP (x, i, j), from, to, 0,
104- unique_copy);
105+ new_rtx = subst (XVECEXP (x, i, j), from, to, 0, 0,
106+ unique_copy);
107
108 /* If this substitution failed, this whole thing
109 fails. */
110@@ -4829,7 +4831,9 @@
111 && (code == SUBREG || code == STRICT_LOW_PART
112 || code == ZERO_EXTRACT))
113 || code == SET)
114- && i == 0), unique_copy);
115+ && i == 0),
116+ code == IF_THEN_ELSE && i == 0,
117+ unique_copy);
118
119 /* If we found that we will have to reject this combination,
120 indicate that by returning the CLOBBER ourselves, rather than
121@@ -4886,7 +4890,7 @@
122 /* If X is sufficiently simple, don't bother trying to do anything
123 with it. */
124 if (code != CONST_INT && code != REG && code != CLOBBER)
125- x = combine_simplify_rtx (x, op0_mode, in_dest);
126+ x = combine_simplify_rtx (x, op0_mode, in_dest, in_cond);
127
128 if (GET_CODE (x) == code)
129 break;
130@@ -4906,10 +4910,12 @@
131 expression.
132
133 OP0_MODE is the original mode of XEXP (x, 0). IN_DEST is nonzero
134- if we are inside a SET_DEST. */
135+ if we are inside a SET_DEST. IN_COND is nonzero if we are on the top level
136+ of a condition. */
137
138 static rtx
139-combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest)
140+combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest,
141+ int in_cond)
142 {
143 enum rtx_code code = GET_CODE (x);
144 enum machine_mode mode = GET_MODE (x);
145@@ -4964,8 +4970,8 @@
146 false arms to store-flag values. Be careful to use copy_rtx
147 here since true_rtx or false_rtx might share RTL with x as a
148 result of the if_then_else_cond call above. */
149- true_rtx = subst (copy_rtx (true_rtx), pc_rtx, pc_rtx, 0, 0);
150- false_rtx = subst (copy_rtx (false_rtx), pc_rtx, pc_rtx, 0, 0);
151+ true_rtx = subst (copy_rtx (true_rtx), pc_rtx, pc_rtx, 0, 0, 0);
152+ false_rtx = subst (copy_rtx (false_rtx), pc_rtx, pc_rtx, 0, 0, 0);
153
154 /* If true_rtx and false_rtx are not general_operands, an if_then_else
155 is unlikely to be simpler. */
156@@ -5309,7 +5315,7 @@
157 {
158 /* Try to simplify the expression further. */
159 rtx tor = simplify_gen_binary (IOR, mode, XEXP (x, 0), XEXP (x, 1));
160- temp = combine_simplify_rtx (tor, VOIDmode, in_dest);
161+ temp = combine_simplify_rtx (tor, VOIDmode, in_dest, 0);
162
163 /* If we could, great. If not, do not go ahead with the IOR
164 replacement, since PLUS appears in many special purpose
165@@ -5402,7 +5408,16 @@
166 ZERO_EXTRACT is indeed appropriate, it will be placed back by
167 the call to make_compound_operation in the SET case. */
168
169- if (STORE_FLAG_VALUE == 1
170+ if (in_cond)
171+ /* Don't apply below optimizations if the caller would
172+ prefer a comparison rather than a value.
173+ E.g., for the condition in an IF_THEN_ELSE most targets need
174+ an explicit comparison. */
175+ {
176+ ;
177+ }
178+
179+ else if (STORE_FLAG_VALUE == 1
180 && new_code == NE && GET_MODE_CLASS (mode) == MODE_INT
181 && op1 == const0_rtx
182 && mode == GET_MODE (op0)
183@@ -5646,11 +5661,11 @@
184 if (reg_mentioned_p (from, true_rtx))
185 true_rtx = subst (known_cond (copy_rtx (true_rtx), true_code,
186 from, true_val),
187- pc_rtx, pc_rtx, 0, 0);
188+ pc_rtx, pc_rtx, 0, 0, 0);
189 if (reg_mentioned_p (from, false_rtx))
190 false_rtx = subst (known_cond (copy_rtx (false_rtx), false_code,
191 from, false_val),
192- pc_rtx, pc_rtx, 0, 0);
193+ pc_rtx, pc_rtx, 0, 0, 0);
194
195 SUBST (XEXP (x, 1), swapped ? false_rtx : true_rtx);
196 SUBST (XEXP (x, 2), swapped ? true_rtx : false_rtx);
197@@ -5867,11 +5882,11 @@
198 {
199 temp = subst (simplify_gen_relational (true_code, m, VOIDmode,
200 cond_op0, cond_op1),
201- pc_rtx, pc_rtx, 0, 0);
202+ pc_rtx, pc_rtx, 0, 0, 0);
203 temp = simplify_gen_binary (MULT, m, temp,
204 simplify_gen_binary (MULT, m, c1,
205 const_true_rtx));
206- temp = subst (temp, pc_rtx, pc_rtx, 0, 0);
207+ temp = subst (temp, pc_rtx, pc_rtx, 0, 0, 0);
208 temp = simplify_gen_binary (op, m, gen_lowpart (m, z), temp);
209
210 if (extend_op != UNKNOWN)