[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 13/43] tcg: Consolidate 3 bits into enum TCGTempKind
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 13/43] tcg: Consolidate 3 bits into enum TCGTempKind |
Date: |
Wed, 9 Sep 2020 19:52:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 9/9/20 2:16 AM, Richard Henderson wrote:
> The temp_fixed, temp_global, temp_local bits are all related.
> Combine them into a single enumeration.
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Already reviewed:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg701705.html
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> include/tcg/tcg.h | 20 +++++---
> tcg/optimize.c | 8 +--
> tcg/tcg.c | 122 ++++++++++++++++++++++++++++------------------
> 3 files changed, 90 insertions(+), 60 deletions(-)
>
> diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
> index 8804a8c4a2..f157092b51 100644
> --- a/include/tcg/tcg.h
> +++ b/include/tcg/tcg.h
> @@ -483,23 +483,27 @@ typedef enum TCGTempVal {
> TEMP_VAL_CONST,
> } TCGTempVal;
>
> +typedef enum TCGTempKind {
> + /* Temp is dead at the end of all basic blocks. */
> + TEMP_NORMAL,
> + /* Temp is saved across basic blocks but dead at the end of TBs. */
> + TEMP_LOCAL,
> + /* Temp is saved across both basic blocks and translation blocks. */
> + TEMP_GLOBAL,
> + /* Temp is in a fixed register. */
> + TEMP_FIXED,
> +} TCGTempKind;
> +
> typedef struct TCGTemp {
> TCGReg reg:8;
> TCGTempVal val_type:8;
> TCGType base_type:8;
> TCGType type:8;
> - unsigned int fixed_reg:1;
> + TCGTempKind kind:3;
3 bits for TEMP_CONST later.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> unsigned int indirect_reg:1;
> unsigned int indirect_base:1;
> unsigned int mem_coherent:1;
> unsigned int mem_allocated:1;
> - /* If true, the temp is saved across both basic blocks and
> - translation blocks. */
> - unsigned int temp_global:1;
> - /* If true, the temp is saved across basic blocks but dead
> - at the end of translation blocks. If false, the temp is
> - dead at the end of basic blocks. */
> - unsigned int temp_local:1;
> unsigned int temp_allocated:1;
>
- [PATCH 06/43] tcg: Remove TCGOpDef.used, (continued)
- [PATCH 06/43] tcg: Remove TCGOpDef.used, Richard Henderson, 2020/09/08
- [PATCH 07/43] tcg/i386: Fix dupi for avx2 32-bit hosts, Richard Henderson, 2020/09/08
- [PATCH 08/43] tcg: Fix generation of dupi_vec for 32-bit host, Richard Henderson, 2020/09/08
- [PATCH 09/43] tcg/optimize: Fold dup2_vec, Richard Henderson, 2020/09/08
- [PATCH 10/43] tcg: Remove TCG_TARGET_HAS_cmp_vec, Richard Henderson, 2020/09/08
- [PATCH 11/43] tcg: Use tcg_out_dupi_vec from temp_load, Richard Henderson, 2020/09/08
- [PATCH 12/43] tcg: Increase tcg_out_dupi_vec immediate to int64_t, Richard Henderson, 2020/09/08
- [PATCH 13/43] tcg: Consolidate 3 bits into enum TCGTempKind, Richard Henderson, 2020/09/08
- Re: [PATCH 13/43] tcg: Consolidate 3 bits into enum TCGTempKind,
Philippe Mathieu-Daudé <=
- [PATCH 14/43] tcg: Add temp_readonly, Richard Henderson, 2020/09/08
- [PATCH 15/43] tcg: Expand TCGTemp.val to 64-bits, Richard Henderson, 2020/09/08
- [PATCH 16/43] tcg: Rename struct tcg_temp_info to TempOptInfo, Richard Henderson, 2020/09/08
- [PATCH 18/43] tcg: Introduce TYPE_CONST temporaries, Richard Henderson, 2020/09/08
- [PATCH 17/43] tcg: Expand TempOptInfo to 64-bits, Richard Henderson, 2020/09/08
- [PATCH 19/43] tcg/optimize: Improve find_better_copy, Richard Henderson, 2020/09/08
- [PATCH 21/43] tcg/optimize: Use tcg_constant_internal with constant folding, Richard Henderson, 2020/09/08
- [PATCH 20/43] tcg/optimize: Adjust TempOptInfo allocation, Richard Henderson, 2020/09/08
- [PATCH 23/43] tcg: Use tcg_constant_i32 with icount expander, Richard Henderson, 2020/09/08
- [PATCH 22/43] tcg: Convert tcg_gen_dupi_vec to TCG_CONST, Richard Henderson, 2020/09/08