1 |
rhill 14/10/02 00:08:08 |
2 |
|
3 |
Modified: README.history |
4 |
Added: 98_all_pr60155.patch |
5 |
Log: |
6 |
Backport PR60155 to stable too. |
7 |
|
8 |
Revision Changes Path |
9 |
1.15 src/patchsets/gcc/4.7.3/gentoo/README.history |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.3/gentoo/README.history?rev=1.15&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.3/gentoo/README.history?rev=1.15&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.3/gentoo/README.history?r1=1.14&r2=1.15 |
14 |
|
15 |
Index: README.history |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.7.3/gentoo/README.history,v |
18 |
retrieving revision 1.14 |
19 |
retrieving revision 1.15 |
20 |
diff -u -r1.14 -r1.15 |
21 |
--- README.history 24 Dec 2013 11:37:45 -0000 1.14 |
22 |
+++ README.history 2 Oct 2014 00:08:08 -0000 1.15 |
23 |
@@ -1,5 +1,6 @@ |
24 |
-1.5 [pending] |
25 |
+1.5 01 Oct 2014 |
26 |
U 67_all_gcc-poison-system-directories.patch |
27 |
+ + 98_all_pr60155.patch |
28 |
|
29 |
1.4 23 Dec 2013 |
30 |
+ 20_all_gcj-freetype.patch |
31 |
|
32 |
|
33 |
|
34 |
1.1 src/patchsets/gcc/4.7.3/gentoo/98_all_pr60155.patch |
35 |
|
36 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.3/gentoo/98_all_pr60155.patch?rev=1.1&view=markup |
37 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.3/gentoo/98_all_pr60155.patch?rev=1.1&content-type=text/plain |
38 |
|
39 |
Index: 98_all_pr60155.patch |
40 |
=================================================================== |
41 |
[ICE/4.8] building net-misc/openssh-6.6_p1 hits get_pressure_class_and_nregs at gcse.c:3438 on alpha |
42 |
https://bugs.gentoo.org/show_bug.cgi?id=512586 |
43 |
https://gcc.gnu.org/PR60155 |
44 |
|
45 |
|
46 |
commit 97f436b3eac628b0ec06d01ea5b8e6426b51e0f4 |
47 |
Author: danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> |
48 |
Date: Fri Apr 4 22:25:51 2014 +0000 |
49 |
|
50 |
PR rtl-optimization/60155 |
51 |
* gcse.c (record_set_data): New function. |
52 |
(single_set_gcse): New function. |
53 |
(gcse_emit_move_after): Use single_set_gcse instead of single_set. |
54 |
(hoist_code): Likewise. |
55 |
(get_pressure_class_and_nregs): Likewise. |
56 |
|
57 |
|
58 |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209134 138bc75d-0d04-0410-961f-82ee72b054a4 |
59 |
|
60 |
|
61 |
--- a/gcc/gcse.c |
62 |
+++ b/gcc/gcse.c |
63 |
@@ -2466,6 +2466,65 @@ pre_insert_copies (void) |
64 |
} |
65 |
} |
66 |
|
67 |
+struct set_data |
68 |
+{ |
69 |
+ rtx insn; |
70 |
+ const_rtx set; |
71 |
+ int nsets; |
72 |
+}; |
73 |
+ |
74 |
+/* Increment number of sets and record set in DATA. */ |
75 |
+ |
76 |
+static void |
77 |
+record_set_data (rtx dest, const_rtx set, void *data) |
78 |
+{ |
79 |
+ struct set_data *s = (struct set_data *)data; |
80 |
+ |
81 |
+ if (GET_CODE (set) == SET) |
82 |
+ { |
83 |
+ /* We allow insns having multiple sets, where all but one are |
84 |
+ dead as single set insns. In the common case only a single |
85 |
+ set is present, so we want to avoid checking for REG_UNUSED |
86 |
+ notes unless necessary. */ |
87 |
+ if (s->nsets == 1 |
88 |
+ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set)) |
89 |
+ && !side_effects_p (s->set)) |
90 |
+ s->nsets = 0; |
91 |
+ |
92 |
+ if (!s->nsets) |
93 |
+ { |
94 |
+ /* Record this set. */ |
95 |
+ s->nsets += 1; |
96 |
+ s->set = set; |
97 |
+ } |
98 |
+ else if (!find_reg_note (s->insn, REG_UNUSED, dest) |
99 |
+ || side_effects_p (set)) |
100 |
+ s->nsets += 1; |
101 |
+ } |
102 |
+} |
103 |
+ |
104 |
+static const_rtx |
105 |
+single_set_gcse (rtx insn) |
106 |
+{ |
107 |
+ struct set_data s; |
108 |
+ rtx pattern; |
109 |
+ |
110 |
+ gcc_assert (INSN_P (insn)); |
111 |
+ |
112 |
+ /* Optimize common case. */ |
113 |
+ pattern = PATTERN (insn); |
114 |
+ if (GET_CODE (pattern) == SET) |
115 |
+ return pattern; |
116 |
+ |
117 |
+ s.insn = insn; |
118 |
+ s.nsets = 0; |
119 |
+ note_stores (pattern, record_set_data, &s); |
120 |
+ |
121 |
+ /* Considered invariant insns have exactly one set. */ |
122 |
+ gcc_assert (s.nsets == 1); |
123 |
+ return s.set; |
124 |
+} |
125 |
+ |
126 |
/* Emit move from SRC to DEST noting the equivalence with expression computed |
127 |
in INSN. */ |
128 |
|
129 |
@@ -2473,7 +2532,8 @@ static rtx |
130 |
gcse_emit_move_after (rtx dest, rtx src, rtx insn) |
131 |
{ |
132 |
rtx new_rtx; |
133 |
- rtx set = single_set (insn), set2; |
134 |
+ const_rtx set = single_set_gcse (insn); |
135 |
+ rtx set2; |
136 |
rtx note; |
137 |
rtx eqv; |
138 |
|
139 |
@@ -3114,13 +3174,12 @@ hoist_code (void) |
140 |
FOR_EACH_VEC_ELT (occr_t, occrs_to_hoist, j, occr) |
141 |
{ |
142 |
rtx insn; |
143 |
- rtx set; |
144 |
+ const_rtx set; |
145 |
|
146 |
gcc_assert (!occr->deleted_p); |
147 |
|
148 |
insn = occr->insn; |
149 |
- set = single_set (insn); |
150 |
- gcc_assert (set); |
151 |
+ set = single_set_gcse (insn); |
152 |
|
153 |
/* Create a pseudo-reg to store the result of reaching |
154 |
expressions into. Get the mode for the new pseudo |