All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers
@ 2013-01-16  9:09 Jay Foad
  2013-01-16 10:47 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Jay Foad @ 2013-01-16  9:09 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Paolo Bonzini, qemu-devel

> @@ -621,6 +627,87 @@ static TCGArg *tcg_constant_folding(TCGContext *s,
> uint16_t *tcg_opc_ptr,
>              break;
>          }
>
> +        /* Simplify using known-zero bits */
> +        mask = -1;
> +        switch (op) {
> +        CASE_OP_32_64(ext8s):
> +            if ((temps[args[1]].mask & 0x80) != 0) {
> +                break;
> +            }
> +        CASE_OP_32_64(ext8u):
> +            mask = 0xff;
> +            goto and_const;
> +        CASE_OP_32_64(ext16s):
> +            if ((temps[args[1]].mask & 0x8000) != 0) {
> +                break;
> +            }
> +        CASE_OP_32_64(ext16u):
> +            mask = 0xffff;
> +            goto and_const;
> +        case INDEX_op_ext32s_i64:
> +            if ((temps[args[1]].mask & 0x80000000) != 0) {
> +                break;
> +            }
> +        case INDEX_op_ext32u_i64:
> +            mask = 0xffffffffU;
> +            goto and_const;
> +
> +        CASE_OP_32_64(and):
> +            mask = temps[args[2]].mask;
> +            if (temps[args[2]].state == TCG_TEMP_CONST) {
> +        and_const:
> +                ;
> +            }

What's the purpose of this "if"?

Jay.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 0/3] tcg-optimize with known-zero bits
@ 2013-01-11 23:42 Richard Henderson
  2013-01-11 23:42 ` [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2013-01-11 23:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Aurelien Jarno

This patch set is extracted from Paolo's target-i386 eflags2
optimization branch:

  git://github.com/bonzini/qemu.git eflags2

I've cherry-picked 3 patches and rebased them vs master.  I've
made a few trivial changes to the patches:

  * Extracting reset_all_temps as a function,
  * Fixing a few type errors wrt target_ulong vs tcg_target_ulong.

While these were written in support of the other changes that
Paolo made wrt target-i386 eflags computation, they're not
dependent on them, and I think they should be considered for
inclusion regardless.


r~


Paolo Bonzini (3):
  optimize: only write to state when clearing optimizer data
  optimize: track nonzero bits of registers
  optimize: optimize using nonzero bits

 tcg/optimize.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 150 insertions(+), 27 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-16 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16  9:09 [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers Jay Foad
2013-01-16 10:47 ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2013-01-11 23:42 [Qemu-devel] [PATCH 0/3] tcg-optimize with known-zero bits Richard Henderson
2013-01-11 23:42 ` [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.