On 16/4/25 00:07, Pierrick Bouvier wrote:
On 4/15/25 12:24, Richard Henderson wrote:
Use per-loop variables instead of one 'i' for the function.

Signed-off-by: Richard Henderson <[email protected]>
---
  tcg/tcg.c | 23 +++++++++++------------
  1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index ed03840988..9da6c8bb4d 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -3924,10 +3924,9 @@ liveness_pass_1(TCGContext *s)
      int nb_temps = s->nb_temps;
      TCGOp *op, *op_prev;
      TCGRegSet *prefs;
-    int i;
      prefs = tcg_malloc(sizeof(TCGRegSet) * nb_temps);
-    for (i = 0; i < nb_temps; ++i) {
+    for (int i = 0; i < nb_temps; ++i) {
          s->temps[i].state_ptr = prefs + i;
      }


@@ -4215,7 +4214,7 @@ liveness_pass_1(TCGContext *s)
              default:
                  args_ct = opcode_args_ct(op);
-                for (i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
+                for (int i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
                      const TCGArgConstraint *ct = &args_ct[i];
                      TCGRegSet set, *pset;

Looks so modern! :)

=)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reviewed-by: Pierrick Bouvier <[email protected]>




Reply via email to