Commit 9370adeb by David Malcolm Committed by David Malcolm

PR jit/63854: Fix leak in tree-ssa-math-opts.c

gcc/ChangeLog:
	PR jit/63854
	* tree-ssa-math-opts.c (execute_cse_sincos_1): Fix a missing
	release of stmts by converting it to an auto_vec.

From-SVN: r218230
parent dc706721
2014-12-01 David Malcolm <dmalcolm@redhat.com>
PR jit/63854
* tree-ssa-math-opts.c (execute_cse_sincos_1): Fix a missing
release of stmts by converting it to an auto_vec.
2014-12-01 Richard Biener <rguenther@suse.de> 2014-12-01 Richard Biener <rguenther@suse.de>
* Makefile.in (gimple-match.o-warn): Use -Wno-unused instead of * Makefile.in (gimple-match.o-warn): Use -Wno-unused instead of
...@@ -740,7 +740,7 @@ execute_cse_sincos_1 (tree name) ...@@ -740,7 +740,7 @@ execute_cse_sincos_1 (tree name)
tree fndecl, res, type; tree fndecl, res, type;
gimple def_stmt, use_stmt, stmt; gimple def_stmt, use_stmt, stmt;
int seen_cos = 0, seen_sin = 0, seen_cexpi = 0; int seen_cos = 0, seen_sin = 0, seen_cexpi = 0;
vec<gimple> stmts = vNULL; auto_vec<gimple> stmts;
basic_block top_bb = NULL; basic_block top_bb = NULL;
int i; int i;
bool cfg_changed = false; bool cfg_changed = false;
...@@ -773,10 +773,7 @@ execute_cse_sincos_1 (tree name) ...@@ -773,10 +773,7 @@ execute_cse_sincos_1 (tree name)
} }
if (seen_cos + seen_sin + seen_cexpi <= 1) if (seen_cos + seen_sin + seen_cexpi <= 1)
{ return false;
stmts.release ();
return false;
}
/* Simply insert cexpi at the beginning of top_bb but not earlier than /* Simply insert cexpi at the beginning of top_bb but not earlier than
the name def statement. */ the name def statement. */
...@@ -835,8 +832,6 @@ execute_cse_sincos_1 (tree name) ...@@ -835,8 +832,6 @@ execute_cse_sincos_1 (tree name)
cfg_changed = true; cfg_changed = true;
} }
stmts.release ();
return cfg_changed; return cfg_changed;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment