This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Why does peephole not handle JUMP before barrier?
- To: gcc at gcc dot gnu dot org
- Subject: Why does peephole not handle JUMP before barrier?
- From: Alan Lehotsky <apl at alum dot mit dot edu>
- Date: Wed, 12 Sep 2001 12:30:07 -0400
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