Commit 8930f723 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/56461 (GCC is leaking lots of memory)

	PR middle-end/56461
	* tree-vect-stmts.c (vectorizable_shift): Don't call create methods
	on vec_oprnds0 or vec_oprnds1 before loop, only call it on
	vec_oprnds1 right before pushing anything to it for
	scalar_shift_arg.

From-SVN: r196425
parent 541d9ac8
2013-03-04 Jakub Jelinek <jakub@redhat.com> 2013-03-04 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56461 PR middle-end/56461
* tree-vect-stmts.c (vectorizable_shift): Don't call create methods
on vec_oprnds0 or vec_oprnds1 before loop, only call it on
vec_oprnds1 right before pushing anything to it for
scalar_shift_arg.
PR middle-end/56461
* tree-vect-loop.c (destroy_loop_vec_info): For !clean_stmts, just * tree-vect-loop.c (destroy_loop_vec_info): For !clean_stmts, just
set nbbs to 0 instead of having separate code path. set nbbs to 0 instead of having separate code path.
(vect_analyze_loop_form): Call destroy_loop_vec_info with true (vect_analyze_loop_form): Call destroy_loop_vec_info with true
...@@ -16,16 +22,17 @@ ...@@ -16,16 +22,17 @@
TARGET_OPTION_PRAGMA_PARSE. Also copy-edit and correct markup. TARGET_OPTION_PRAGMA_PARSE. Also copy-edit and correct markup.
* doc/tm.texi: Regenerated. * doc/tm.texi: Regenerated.
2013-03-02 David Holsgrove <david.holsgrove@xilinx.com> 2013-03-02 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.c: * config/microblaze/microblaze.c:
Check mcpu, pcmp requirement and set TARGET_REORDER to 0 if not met. Check mcpu, pcmp requirement and set TARGET_REORDER to 0 if not met.
* config/microblaze/microblaze.h: Add -mxl-reorder to DRIVER_SELF_SPECS * config/microblaze/microblaze.h: Add -mxl-reorder to
* config/microblaze/microblaze.md: New bswapsi2 and bswaphi2 DRIVER_SELF_SPECS.
instructions emitted if TARGET_REORDER * config/microblaze/microblaze.md: New bswapsi2 and bswaphi2.
* config/microblaze/microblaze.opt: New option -mxl-reorder set to 1 instructions emitted if TARGET_REORDER.
* config/microblaze/microblaze.opt: New option -mxl-reorder set to 1
or 0 for -m/-mno case, but initialises as 2 to detect default use case or 0 for -m/-mno case, but initialises as 2 to detect default use case
separately separately.
2013-03-01 Xinliang David Li <davidxl@google.com> 2013-03-01 Xinliang David Li <davidxl@google.com>
......
...@@ -3335,21 +3335,6 @@ vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi, ...@@ -3335,21 +3335,6 @@ vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi,
/* Handle def. */ /* Handle def. */
vec_dest = vect_create_destination_var (scalar_dest, vectype); vec_dest = vect_create_destination_var (scalar_dest, vectype);
/* Allocate VECs for vector operands. In case of SLP, vector operands are
created in the previous stages of the recursion, so no allocation is
needed, except for the case of shift with scalar shift argument. In that
case we store the scalar operand in VEC_OPRNDS1 for every vector stmt to
be created to vectorize the SLP group, i.e., SLP_NODE->VEC_STMTS_SIZE.
In case of loop-based vectorization we allocate VECs of size 1. We
allocate VEC_OPRNDS1 only in case of binary operation. */
if (!slp_node)
{
vec_oprnds0.create (1);
vec_oprnds1.create (1);
}
else if (scalar_shift_arg)
vec_oprnds1.create (slp_node->vec_stmts_size);
prev_stmt_info = NULL; prev_stmt_info = NULL;
for (j = 0; j < ncopies; j++) for (j = 0; j < ncopies; j++)
{ {
...@@ -3369,6 +3354,7 @@ vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi, ...@@ -3369,6 +3354,7 @@ vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi,
dump_printf_loc (MSG_NOTE, vect_location, dump_printf_loc (MSG_NOTE, vect_location,
"operand 1 using scalar mode."); "operand 1 using scalar mode.");
vec_oprnd1 = op1; vec_oprnd1 = op1;
vec_oprnds1.create (slp_node ? slp_node->vec_stmts_size : 1);
vec_oprnds1.quick_push (vec_oprnd1); vec_oprnds1.quick_push (vec_oprnd1);
if (slp_node) if (slp_node)
{ {
......
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