* [Buildroot] [PATCH] gcc 4.8.3: add patch for PR60155
@ 2014-07-02 13:43 Gustavo Zacarias
2014-07-02 14:18 ` Thomas Petazzoni
2014-07-02 15:14 ` Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: Gustavo Zacarias @ 2014-07-02 13:43 UTC (permalink / raw)
To: buildroot
Fixes:
http://autobuild.buildroot.net/results/6c8/6c8c3cb19a6f98f6f27986b671d48ee092fdf7cc/
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/gcc/4.8.3/842-PR60155.patch | 111 ++++++++++++++++++++++++++++++++++++
1 file changed, 111 insertions(+)
create mode 100644 package/gcc/4.8.3/842-PR60155.patch
diff --git a/package/gcc/4.8.3/842-PR60155.patch b/package/gcc/4.8.3/842-PR60155.patch
new file mode 100644
index 0000000..7bc2122
--- /dev/null
+++ b/package/gcc/4.8.3/842-PR60155.patch
@@ -0,0 +1,111 @@
+From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
+Upstream status: in trunk.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+--- trunk/gcc/gcse.c 2014/02/12 14:50:06 207726
++++ trunk/gcc/gcse.c 2014/04/04 22:25:51 209134
+@@ -2502,6 +2502,65 @@
+ }
+ }
+
++struct set_data
++{
++ rtx insn;
++ const_rtx set;
++ int nsets;
++};
++
++/* Increment number of sets and record set in DATA. */
++
++static void
++record_set_data (rtx dest, const_rtx set, void *data)
++{
++ struct set_data *s = (struct set_data *)data;
++
++ if (GET_CODE (set) == SET)
++ {
++ /* We allow insns having multiple sets, where all but one are
++ dead as single set insns. In the common case only a single
++ set is present, so we want to avoid checking for REG_UNUSED
++ notes unless necessary. */
++ if (s->nsets == 1
++ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set))
++ && !side_effects_p (s->set))
++ s->nsets = 0;
++
++ if (!s->nsets)
++ {
++ /* Record this set. */
++ s->nsets += 1;
++ s->set = set;
++ }
++ else if (!find_reg_note (s->insn, REG_UNUSED, dest)
++ || side_effects_p (set))
++ s->nsets += 1;
++ }
++}
++
++static const_rtx
++single_set_gcse (rtx insn)
++{
++ struct set_data s;
++ rtx pattern;
++
++ gcc_assert (INSN_P (insn));
++
++ /* Optimize common case. */
++ pattern = PATTERN (insn);
++ if (GET_CODE (pattern) == SET)
++ return pattern;
++
++ s.insn = insn;
++ s.nsets = 0;
++ note_stores (pattern, record_set_data, &s);
++
++ /* Considered invariant insns have exactly one set. */
++ gcc_assert (s.nsets == 1);
++ return s.set;
++}
++
+ /* Emit move from SRC to DEST noting the equivalence with expression computed
+ in INSN. */
+
+@@ -2509,7 +2568,8 @@
+ gcse_emit_move_after (rtx dest, rtx src, rtx insn)
+ {
+ rtx new_rtx;
+- rtx set = single_set (insn), set2;
++ const_rtx set = single_set_gcse (insn);
++ rtx set2;
+ rtx note;
+ rtx eqv = NULL_RTX;
+
+@@ -3369,13 +3429,12 @@
+ FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr)
+ {
+ rtx insn;
+- rtx set;
++ const_rtx set;
+
+ gcc_assert (!occr->deleted_p);
+
+ insn = occr->insn;
+- set = single_set (insn);
+- gcc_assert (set);
++ set = single_set_gcse (insn);
+
+ /* Create a pseudo-reg to store the result of reaching
+ expressions into. Get the mode for the new pseudo
+@@ -3456,10 +3515,8 @@
+ {
+ rtx reg;
+ enum reg_class pressure_class;
+- rtx set = single_set (insn);
++ const_rtx set = single_set_gcse (insn);
+
+- /* Considered invariant insns have only one set. */
+- gcc_assert (set != NULL_RTX);
+ reg = SET_DEST (set);
+ if (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
--
1.8.5.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] gcc 4.8.3: add patch for PR60155
2014-07-02 13:43 [Buildroot] [PATCH] gcc 4.8.3: add patch for PR60155 Gustavo Zacarias
@ 2014-07-02 14:18 ` Thomas Petazzoni
2014-07-02 14:23 ` Gustavo Zacarias
2014-07-02 15:14 ` Peter Korsgaard
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-07-02 14:18 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Wed, 2 Jul 2014 10:43:37 -0300, Gustavo Zacarias wrote:
> Fixes:
> http://autobuild.buildroot.net/results/6c8/6c8c3cb19a6f98f6f27986b671d48ee092fdf7cc/
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> package/gcc/4.8.3/842-PR60155.patch | 111 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 111 insertions(+)
> create mode 100644 package/gcc/4.8.3/842-PR60155.patch
>
> diff --git a/package/gcc/4.8.3/842-PR60155.patch b/package/gcc/4.8.3/842-PR60155.patch
> new file mode 100644
> index 0000000..7bc2122
> --- /dev/null
> +++ b/package/gcc/4.8.3/842-PR60155.patch
> @@ -0,0 +1,111 @@
> +From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
> +Upstream status: in trunk.
Just to confirm: is it 4.9.0 already?
Also, it doesn't immediately fix the autobuild issue, because the
autobuild issue occurs with a pre-built Crosstool-NG toolchain. I'll
temporarily add an exception in the autobuilders, and then hopefully
Yann will pick up the patch in Crosstool-NG and at some point we'll be
able to update the pre-built Crosstool-NG toolchain.
Thanks a lot for the investigation!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] gcc 4.8.3: add patch for PR60155
2014-07-02 14:18 ` Thomas Petazzoni
@ 2014-07-02 14:23 ` Gustavo Zacarias
2014-07-02 14:35 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Gustavo Zacarias @ 2014-07-02 14:23 UTC (permalink / raw)
To: buildroot
On 07/02/2014 11:18 AM, Thomas Petazzoni wrote:
> Just to confirm: is it 4.9.0 already?
>
> Also, it doesn't immediately fix the autobuild issue, because the
> autobuild issue occurs with a pre-built Crosstool-NG toolchain. I'll
> temporarily add an exception in the autobuilders, and then hopefully
> Yann will pick up the patch in Crosstool-NG and at some point we'll be
> able to update the pre-built Crosstool-NG toolchain.
>
> Thanks a lot for the investigation!
>
> Thomas
Yes, gcc 4.9.0 doesn't need it.
IMHO it should have been in 4.8.3 since the bug was resolved in April 4
and gcc was released on May 22, but i don't know their release policies
so who knows.
Regarding CT-NG that's up to Yann, and yes an exception is in order,
though if you look at other failures it does affect internal toolchains
as well so the fix alone will make errors go down albeit not all of them.
Regards.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] gcc 4.8.3: add patch for PR60155
2014-07-02 14:23 ` Gustavo Zacarias
@ 2014-07-02 14:35 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-07-02 14:35 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Wed, 02 Jul 2014 11:23:10 -0300, Gustavo Zacarias wrote:
> Yes, gcc 4.9.0 doesn't need it.
Cool.
> IMHO it should have been in 4.8.3 since the bug was resolved in April 4
> and gcc was released on May 22, but i don't know their release policies
> so who knows.
OK.
> Regarding CT-NG that's up to Yann, and yes an exception is in order,
> though if you look at other failures it does affect internal toolchains
> as well so the fix alone will make errors go down albeit not all of them.
Yes, sure. I'll work on the autobuilder exception.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] gcc 4.8.3: add patch for PR60155
2014-07-02 13:43 [Buildroot] [PATCH] gcc 4.8.3: add patch for PR60155 Gustavo Zacarias
2014-07-02 14:18 ` Thomas Petazzoni
@ 2014-07-02 15:14 ` Peter Korsgaard
1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2014-07-02 15:14 UTC (permalink / raw)
To: buildroot
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
> Fixes:
> http://autobuild.buildroot.net/results/6c8/6c8c3cb19a6f98f6f27986b671d48ee092fdf7cc/
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-02 15:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-02 13:43 [Buildroot] [PATCH] gcc 4.8.3: add patch for PR60155 Gustavo Zacarias
2014-07-02 14:18 ` Thomas Petazzoni
2014-07-02 14:23 ` Gustavo Zacarias
2014-07-02 14:35 ` Thomas Petazzoni
2014-07-02 15:14 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.