tcg: Optimize spills of constants
authorRichard Henderson <rth@twiddle.net>
Mon, 20 Jun 2016 05:59:13 +0000 (22:59 -0700)
committerRichard Henderson <rth@twiddle.net>
Wed, 6 Jul 2016 03:50:13 +0000 (20:50 -0700)
commit59d7c14eeff8d2ad7f61aed86ce5a176113bc153
treea35fd8794ff364683cd31b650affc4f3d9289ce1
parent120c1084ed53ba2967ba2a6e751cdfb00a17c246
tcg: Optimize spills of constants

While we can store constants via constrants on INDEX_op_st_i32 et al,
we weren't able to spill constants to backing store.

Add a new backend interface, tcg_out_sti, which may store the constant
(and is allowed to fail).  Rearrange the temp_* helpers so that we only
attempt to directly store a constant when the temp is becoming dead/free.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/aarch64/tcg-target.inc.c
tcg/arm/tcg-target.inc.c
tcg/i386/tcg-target.inc.c
tcg/ia64/tcg-target.inc.c
tcg/mips/tcg-target.inc.c
tcg/ppc/tcg-target.inc.c
tcg/s390/tcg-target.inc.c
tcg/sparc/tcg-target.inc.c
tcg/tcg.c
tcg/tci/tcg-target.inc.c