]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
phiprop: Move vuse variable declaration to right before use master trunk
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Fri, 27 Mar 2026 23:05:39 +0000 (16:05 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 28 Apr 2026 18:02:08 +0000 (11:02 -0700)
This is just a small cleanup moving the variable declaration
of vuse to right before its use.

Bootstrappd and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-ssa-phiprop.cc (propagate_with_phi): Move vuse variable
declaration right before its use.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/tree-ssa-phiprop.cc

index 873cff1c15efe668b8e55e57a511c74a6314c764..07c81fdce28f225b5c43296d46cd65b71be4f174 100644 (file)
@@ -385,7 +385,6 @@ propagate_with_phi (basic_block bb, gphi *vphi, gphi *phi,
            && !gimple_has_volatile_ops (use_stmt)))
        continue;
 
-      tree vuse = gimple_vuse (use_stmt);
       if (!can_handle_load (use_stmt, bb, vphi, up_vuse))
        continue;
 
@@ -437,6 +436,7 @@ propagate_with_phi (basic_block bb, gphi *vphi, gphi *phi,
          gimple *vuse_stmt;
          imm_use_iterator vui;
          use_operand_p vuse_p;
+         tree vuse = gimple_vuse (use_stmt);
          /* In order to move the aggregate copies earlier, make sure
             there are no statements that could read from memory
             aliasing the lhs in between the start of bb and use_stmt.
@@ -491,6 +491,7 @@ propagate_with_phi (basic_block bb, gphi *vphi, gphi *phi,
         is the first load transformation.  */
       else
        {
+         tree vuse = gimple_vuse (use_stmt);
          res = phiprop_insert_phi (bb, phi, use_stmt, phivn, n, dce_ssa_names);
          type = TREE_TYPE (res);