This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

flow patch for BARRIER removal after ADDR_VEC removal.



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;
+			    }
 			}
 		    }
 		}
============================================================

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]