diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-08 17:50:44 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-08 17:50:44 +0000 |
commit | 3f6d43bfaf47f4b24ed1332321f11973f9163d31 (patch) | |
tree | 13c48cf9a83eda38db5d18ada4bb3f016f61ab26 | |
parent | 420aadad89c0873c0de3d1952fd584ea1c43965d (diff) | |
download | gcc-3f6d43bfaf47f4b24ed1332321f11973f9163d31.tar.gz |
[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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228619 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-phiopt.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2e4f6a37ee..9f84b6ef837 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-08 Jeff Law <law@redhat.com> + + * tree-ssa-phiopt.c (factor_out_conversion): Add missing calls to + release_ssa_name. Fix typo in comment. + 2015-10-08 Nathan Sidwell <nathan@acm.org> * config/nvptx/nvptx.h (struct machine_function): Add comment. diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index f33ca5c376c..cfa38680249 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; |