* branch delay slots
@ 2007-12-12 12:13 Boris Boesler
2007-12-12 15:27 ` Ian Lance Taylor
2007-12-12 15:48 ` Eric Botcazou
0 siblings, 2 replies; 5+ messages in thread
From: Boris Boesler @ 2007-12-12 12:13 UTC (permalink / raw)
To: GCC
Hi!
I "implemented" branch delay slots (define_delay) for my
architecture and I use the command line option -fdelayed-branch. But
branch delay slot filling is done just for a few candidates. Even for
the same rule within the same compilation unit (C file) it is done in
a few cases but not in all. How can this happen?
Boris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: branch delay slots
2007-12-12 12:13 branch delay slots Boris Boesler
@ 2007-12-12 15:27 ` Ian Lance Taylor
2007-12-12 18:13 ` Boris Boesler
2007-12-12 15:48 ` Eric Botcazou
1 sibling, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2007-12-12 15:27 UTC (permalink / raw)
To: Boris Boesler; +Cc: GCC
Boris Boesler <baembel@gmx.de> writes:
> I "implemented" branch delay slots (define_delay) for my
> architecture and I use the command line option -fdelayed-branch. But
> branch delay slot filling is done just for a few candidates. Even for
> the same rule within the same compilation unit (C file) it is done in
> a few cases but not in all. How can this happen?
There are many possible reasons. The first step is to look at the
dump file generated by -fdump-rtl-dbr.
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: branch delay slots
2007-12-12 12:13 branch delay slots Boris Boesler
2007-12-12 15:27 ` Ian Lance Taylor
@ 2007-12-12 15:48 ` Eric Botcazou
1 sibling, 0 replies; 5+ messages in thread
From: Eric Botcazou @ 2007-12-12 15:48 UTC (permalink / raw)
To: Boris Boesler; +Cc: gcc
> I "implemented" branch delay slots (define_delay) for my
> architecture and I use the command line option -fdelayed-branch. But
> branch delay slot filling is done just for a few candidates. Even for
> the same rule within the same compilation unit (C file) it is done in
> a few cases but not in all. How can this happen?
You should not need to pass -fdelayed-branch explicitly. If you do, this
means you're compiling at -O0, in which case the problem you run into is not
very surprising. Just compile with bare -O1 at a minimum.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: branch delay slots
2007-12-12 15:27 ` Ian Lance Taylor
@ 2007-12-12 18:13 ` Boris Boesler
2007-12-12 18:47 ` Richard Sandiford
0 siblings, 1 reply; 5+ messages in thread
From: Boris Boesler @ 2007-12-12 18:13 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: GCC
Am 12.12.2007 um 16:21 schrieb Ian Lance Taylor:
> Boris Boesler <baembel@gmx.de> writes:
>
>> I "implemented" branch delay slots (define_delay) for my
>> architecture and I use the command line option -fdelayed-branch. But
>> branch delay slot filling is done just for a few candidates. Even for
>> the same rule within the same compilation unit (C file) it is done in
>> a few cases but not in all. How can this happen?
>
> There are many possible reasons. The first step is to look at the
> dump file generated by -fdump-rtl-dbr.
Could have thought of this myself ..
Ok, I think I found it: GCC leaves control-flow operations as they
are, if it can not place other operations in branch delay slots
(represented as SEQUENCEs in GCC); or in other words: GCC does not
represent empty delay slots.
Is this correct?
Boris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: branch delay slots
2007-12-12 18:13 ` Boris Boesler
@ 2007-12-12 18:47 ` Richard Sandiford
0 siblings, 0 replies; 5+ messages in thread
From: Richard Sandiford @ 2007-12-12 18:47 UTC (permalink / raw)
To: Boris Boesler; +Cc: Ian Lance Taylor, GCC
Boris Boesler <baembel@gmx.de> writes:
> Ok, I think I found it: GCC leaves control-flow operations as they
> are, if it can not place other operations in branch delay slots
> (represented as SEQUENCEs in GCC); or in other words: GCC does not
> represent empty delay slots.
>
> Is this correct?
Yeah. See e.g. the way the MIPS port deals with this. The jump and
call patterns add a nop to the asm string when final_sequence is null.
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-12-12 18:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-12 12:13 branch delay slots Boris Boesler
2007-12-12 15:27 ` Ian Lance Taylor
2007-12-12 18:13 ` Boris Boesler
2007-12-12 18:47 ` Richard Sandiford
2007-12-12 15:48 ` Eric Botcazou
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).