On 09/21/2012 02:23 PM, Aurelien Jarno wrote:
> Now I wonder if it wouldn't be better to write brcond2 as setcond2 +
> brcond. And even setcond2 as a pair of setcond in TCG, which would allow
> some optimizations in case both high parts are zero.

I think brcond2 vs setcond2 is a choice that has to be made on a
host-by-host basis.  E.g. for i386 we implement setcond2 with branches.
E.g. for hppa setcond2, while not using branches, is twice the size of
brcond2.  But there's nothing saying you couldn't have the mips
version of brcond2 use setcond2 internals to do its job.

On the other hand, having tcg/optimize.c reduce both setcond2 and brcond2
to setcond and brcond with the appropriate values of zero would be a most
welcome improvement.

Also, I've been thinking about having a tcg.h function that produces the
cond-without-equality table that I introduced to fix hppa recently.  Using
that could reduce code size in some of the other backends as well.


r~

Reply via email to