aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2011-05-17 18:25:45 +0200
committerAurelien Jarno <aurelien@aurel32.net>2011-05-23 22:38:13 +0200
commit6b64b624cde336f3df1146483e7858f5fa814f95 (patch)
treea42075d9cf0489db4a06fc135b9f53f3cc368886 /tcg/tcg.c
parent866cb6cb21b91809f3f5c49c7c4268573552a108 (diff)
downloadqemu-6b64b624cde336f3df1146483e7858f5fa814f95.zip
qemu-6b64b624cde336f3df1146483e7858f5fa814f95.tar.gz
qemu-6b64b624cde336f3df1146483e7858f5fa814f95.tar.bz2
tcg: mark dead output argument in op_dead_args
If an op is not removed and has dead output arguments, mark it in op_dead_args similarly to what is done for input arguments. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 9a48cb9..82d3e1d 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1245,8 +1245,12 @@ static void tcg_liveness_analysis(TCGContext *s)
do_not_remove_call:
/* output args are dead */
+ dead_args = 0;
for(i = 0; i < nb_oargs; i++) {
arg = args[i];
+ if (dead_temps[arg]) {
+ dead_args |= (1 << i);
+ }
dead_temps[arg] = 1;
}
@@ -1256,7 +1260,6 @@ static void tcg_liveness_analysis(TCGContext *s)
}
/* input args are live */
- dead_args = 0;
for(i = nb_oargs; i < nb_iargs + nb_oargs; i++) {
arg = args[i];
if (arg != TCG_CALL_DUMMY_ARG) {
@@ -1313,8 +1316,12 @@ static void tcg_liveness_analysis(TCGContext *s)
do_not_remove:
/* output args are dead */
+ dead_args = 0;
for(i = 0; i < nb_oargs; i++) {
arg = args[i];
+ if (dead_temps[arg]) {
+ dead_args |= (1 << i);
+ }
dead_temps[arg] = 1;
}
@@ -1327,7 +1334,6 @@ static void tcg_liveness_analysis(TCGContext *s)
}
/* input args are live */
- dead_args = 0;
for(i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
arg = args[i];
if (dead_temps[arg]) {