This is the mail archive of the gcc@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]

Why does peephole not handle JUMP before barrier?


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


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