public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Why does peephole not handle JUMP before barrier?
@ 2001-09-12  9:30 Alan Lehotsky
  0 siblings, 0 replies; only message in thread
From: Alan Lehotsky @ 2001-09-12  9:30 UTC (permalink / raw)
  To: gcc

genpeep.c produces a peephole() function that explicitly excludes performing peepholes on
anything that's immediately followed by a barrier instruction.

I've got a machine that has branch delay slots.  If the instruction following a branch is another branch,
then the second branch is suppressed.  So, if I have something like

		jeq	$10
		  nop
		jmp	$12
		  ....

that can be replaced by

	jeq $10
	jmp $12
	...

avoiding the nop.

But, if I've got

		jmp	$10
		  nop
		jmp $12
		  nop

the peephole() NEVER looks at the jmp $10, as it's actually got a barrier after it.


-- 
------------------------------------------------------------------------

		    Quality Software Management
		http://home.earthlink.net/~qsmgmt
			apl@alum.mit.edu
			(978)287-0435 Voice
			(978)808-6836 Cell
			(978)287-0436 Fax

	Software Process Improvement and Management Consulting
	     Language Design and Compiler Implementation

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-09-12  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-12  9:30 Why does peephole not handle JUMP before barrier? Alan Lehotsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).