aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2015-10-08 11:50:44 -0600
committerJeff Law <law@gcc.gnu.org>2015-10-08 11:50:44 -0600
commitd1acc3f4d2dbe3619f977f2cacca446bff74e1a7 (patch)
tree13c48cf9a83eda38db5d18ada4bb3f016f61ab26 /gcc/tree-ssa-phiopt.c
parent25662751d1b0c026bfd9790deb5c1c7cd1d2c8f9 (diff)
downloadgcc-d1acc3f4d2dbe3619f977f2cacca446bff74e1a7.zip
gcc-d1acc3f4d2dbe3619f977f2cacca446bff74e1a7.tar.gz
gcc-d1acc3f4d2dbe3619f977f2cacca446bff74e1a7.tar.bz2
[PATCH] [1/n] Fix minor SSA_NAME leaks
* tree-ssa-phiopt.c (factor_out_conversion): Add missing calls to release_ssa_name. Fix typo in comment. From-SVN: r228619
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r--gcc/tree-ssa-phiopt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index f33ca5c..cfa3868 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -511,10 +511,13 @@ factor_out_conditional_conversion (edge e0, edge e1, gphi *phi,
/* Remove the old cast(s) that has single use. */
gsi_for_def = gsi_for_stmt (arg0_def_stmt);
gsi_remove (&gsi_for_def, true);
+ release_defs (arg0_def_stmt);
+
if (arg1_def_stmt)
{
gsi_for_def = gsi_for_stmt (arg1_def_stmt);
gsi_remove (&gsi_for_def, true);
+ release_defs (arg1_def_stmt);
}
add_phi_arg (newphi, new_arg0, e0, locus);
@@ -527,7 +530,7 @@ factor_out_conditional_conversion (edge e0, edge e1, gphi *phi,
gsi = gsi_after_labels (gimple_bb (phi));
gsi_insert_before (&gsi, new_stmt, GSI_SAME_STMT);
- /* Remove he original PHI stmt. */
+ /* Remove the original PHI stmt. */
gsi = gsi_for_stmt (phi);
gsi_remove (&gsi, true);
return true;