]> git.proxmox.com Git - mirror_qemu.git/commit - tcg/optimize.c
optimize: track nonzero bits of registers
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 Jan 2013 23:42:52 +0000 (15:42 -0800)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 19 Jan 2013 10:13:14 +0000 (10:13 +0000)
commit3a9d8b179b1e43237365ede641d5aa6779ba91bc
tree81c03d4e59337804a9498e03a9b2060e1d874c12
parentd193a14a2c94c9c4877ab100c31ec174dc78644c
optimize: track nonzero bits of registers

Add a "mask" field to the tcg_temp_info struct.  A bit that is zero
in "mask" will always be zero in the corresponding temporary.
Zero bits in the mask can be produced from moves of immediates,
zero-extensions, ANDs with constants, shifts; they can then be
be propagated by logical operations, shifts, sign-extensions,
negations, deposit operations, and conditional moves.  Other
operations will just reset the mask to all-ones, i.e. unknown.

[rth: s/target_ulong/tcg_target_ulong/]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg/optimize.c