Skip to contentSkip to conversation

tcg: Don't make exitreq flag a local temporary

PATCH Applied Richard Henderson 3 participants 3 messages Mar 5, 2013 – Mar 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg: Don't make exitreq flag a local temporary

The value is not actually live across basic blocks, so there's no need for the local property. This eliminates storing the temporary to its home location at the branch.

---
 include/exec/gen-icount.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/exec/gen-icount.h +1 -1
index 4e3b17b..4fc7b29 100644
@@ -15,7 +15,7 @@ static inline void gen_tb_start(void)
     TCGv_i32 flag;
 
     exitreq_label = gen_new_label();
-    flag = tcg_temp_local_new_i32();
+    flag = tcg_temp_new_i32();
     tcg_gen_ld_i32(flag, cpu_env,
                    offsetof(CPUState, tcg_exit_req) - ENV_OFFSET);
     tcg_gen_brcondi_i32(TCG_COND_NE, flag, 0, exitreq_label);
Signature · 1 line
1.8.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Richard Henderson

The value is not actually live across basic blocks, so there's no need for the local property. This eliminates storing the temporary to its home location at the branch.

I hadn't noticed we differed from the icount code in not needing to access the temp after the branch.

-- PMM

#2 lore raw
In reply to Richard Henderson
Quoted 15 lines · Richard Henderson

The value is not actually live across basic blocks, so there's no need for the local property. This eliminates storing the temporary to its home location at the branch.

---
 include/exec/gen-icount.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/exec/gen-icount.h +0 -0
index 4e3b17b..4fc7b29 100644

include/exec/gen-icount.h static inline void gen_tb_start(void) · line 21

Quoted 8 lines
include/exec/gen-icount.h +1 -1
@@ -15,7 +15,7 @@ static inline void gen_tb_start(void)
     TCGv_i32 flag;
 
     exitreq_label = gen_new_label();
-    flag = tcg_temp_local_new_i32();
+    flag = tcg_temp_new_i32();
     tcg_gen_ld_i32(flag, cpu_env,
                    offsetof(CPUState, tcg_exit_req) - ENV_OFFSET);
     tcg_gen_brcondi_i32(TCG_COND_NE, flag, 0, exitreq_label);

Thanks, applied.

Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net