This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
flow patch for BARRIER removal after ADDR_VEC removal.
- To: gcc-patches at gcc dot gnu dot org
- Subject: flow patch for BARRIER removal after ADDR_VEC removal.
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Thu, 23 Mar 2000 17:39:57 -0800
jump apparently can't handle
(set (pc) (something))
(code_label foo)
(barrier)
even if it happens that the code_label is never called, and this gets
generated on ppc when a switch statement is made unconditional by
(IIRC) GCSE.
So we have flow take out the barrier when it takes out the ADDR_VEC.
This fixes the bootstrap on ppc.
OK to install?
--
- Geoffrey Keating <geoffk@cygnus.com>
===File ~/patches/cygnus/rs6000-nobarrier.patch=============
2000-03-23 Geoff Keating <geoffk@cygnus.com>
* flow.c (propagate_block): When we delete an ADDR_VEC,
also delete the BARRIER following it if there is one.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.240
diff -p -u -u -p -r1.240 flow.c
--- flow.c 2000/03/22 07:14:41 1.240
+++ flow.c 2000/03/24 01:39:23
@@ -3328,6 +3328,14 @@ propagate_block (bb, old, significant, f
PUT_CODE (next, NOTE);
NOTE_LINE_NUMBER (next) = NOTE_INSN_DELETED;
NOTE_SOURCE_FILE (next) = 0;
+
+ if ((next = next_nonnote_insn (label)) != NULL
+ && GET_CODE (next) == BARRIER)
+ {
+ PUT_CODE (next, NOTE);
+ NOTE_LINE_NUMBER (next) = NOTE_INSN_DELETED;
+ NOTE_SOURCE_FILE (next) = 0;
+ }
}
}
}
============================================================