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]
Other format: [Raw text]

Re: Reducing JUMPs and using conditional exec based on if_then_else


On Sun, 28 Nov 2004, Sami Khawam wrote:
> I have built a CPU architecture (based on the
> OpenRISC .md files)

Which isn't in the official GCC sources.  There's a hint
there...

> where I would like to reduce the
> number of jump calls to a minimum and use other
> altervatives like conditional execution. I have set
> BRANCH_COST to 40 and REGISTER_MOVE_COST to 0 (so it
> can use as many MOVs at it wants) and added the 2
> insns (see below) to the .md file defining two
> conditional moves, one based on cond_exec and the
> other on if_then_else (is such thing possible?).
> The problem is that the compiler cannot do any of
> the required optimizations.
> Is this a limitation in ifcvt.c? Or is it me doing
> something wrong?

It seems what you want is the standard pattern movXcc (where X
is the mode of the data you want to move), so you need to name
your pattern movsicc.  Did you miss this in the documentation?
I can see it.  If the wording is bad, please help with patches.
When you look at existing targets (another hint) this is usually
implemented as a define_expand.  See for example mmix.md.

brgds, H-P


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