Statistics
| Branch: | Revision:

root / tcg @ 7dfd8c6a

Name Size
  arm
  hppa
  i386
  ia64
  mips
  ppc
  ppc64
  s390
  sparc
  tci
LICENSE 146 Bytes
README 15 kB
TODO 394 Bytes
optimize.c 29.5 kB
tcg-op.h 84.6 kB
tcg-opc.h 9.6 kB
tcg-runtime.h 706 Bytes
tcg.c 80.3 kB
tcg.h 18.9 kB

Latest revisions

# Date Author Comment
c29c1d7e 10/28/2012 03:54 pm Aurelien Jarno

tcg: rewrite tcg_reg_alloc_mov()

Now that the liveness analysis provides more information, rewrite
tcg_reg_alloc_mov(). This changes the behaviour about propagating
constants and memory accesses. We now take the assumption that once
a value is loaded into a register (from memory or from a constant),...

a52ad07e 10/28/2012 03:54 pm Aurelien Jarno

tcg: always mark dead input arguments as dead

Always mark dead input arguments as dead, even if the op is at the basic
block end. This will allow to check that all temps are correctly saved.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

7dfd8c6a 10/28/2012 03:54 pm Aurelien Jarno

tcg: start with local temps in TEMP_VAL_MEM state

Start with local temps in TEMP_VAL_MEM state, to make possible a later
check that all the temps are correctly saved back to memory.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

639368dd 10/28/2012 03:54 pm Aurelien Jarno

tcg: add temp_dead()

A lot of code is duplicated to mark a temporary as dead. Replace it
by temp_dead(), which in addition marks the temp as saved in memory
for globals and local temps, instead of doing this a posteriori in
temp_save().

Reviewed-by: Richard Henderson <>...

7f6ceedf 10/28/2012 03:54 pm Aurelien Jarno

tcg: add tcg_reg_sync()

Add a new function tcg_reg_sync() to synchronize the canonical location
of a temp with the value in the associated register, but without freeing
it. Rewrite tcg_reg_free() to first call tcg_reg_sync() and then to free
the register....

1ad80729 10/28/2012 03:54 pm Aurelien Jarno

tcg: add temp_sync()

Add a new function temp_sync() to synchronize the canonical location
of a temp with the value in the corresponding register, but without
freeing the associated register. Rewrite temp_save() to call
temp_sync() followed by temp_dead()....

ec7a869d 10/28/2012 03:54 pm Aurelien Jarno

tcg: sync output arguments on liveness request

Synchronize an output argument when requested by the liveness analysis.
This is needed so that the temp can be declared dead later.

For that, add a new op_sync_args table in which each bit tells if the
corresponding output argument needs to be synchronized with the memory....

9c43b68d 10/28/2012 03:54 pm Aurelien Jarno

tcg: rework liveness analysis

Rework the liveness analysis by tracking temps that need to go back to
memory in addition to dead temps tracking. This allows to mark output
arguments as "need sync", and to synchronize them back to memory as soon
as they are not written anymore. This way even arguments mapping to...

4c4e1ab2 10/28/2012 03:54 pm Aurelien Jarno

tcg: improve tcg_reg_alloc_movi()

Now that the liveness analysis might mark some output temps as dead, call
temp_dead() if needed.

Reviewed-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

17b91491 10/28/2012 03:54 pm Aurelien Jarno

tcg/i386: remove ld/st third argument register constraint

On x86_64, remove the constraint on the third argument register which
is not needed:
- For loads the helper arguments are env, addr, mem_idx. The addr
value should not be in the two first argument registers as they are...

View revisions

Also available in: Atom