public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Tom de Vries <Tom_deVries@mentor.com>
Cc: "gcc-patches@gnu.org" <gcc-patches@gnu.org>
Subject: Re: [PATCH, PR68460] Always call free_stmt_vec_info_vec in gather_scalar_reductions
Date: Mon, 23 Nov 2015 09:43:00 -0000	[thread overview]
Message-ID: <CAFiYyc24redGcv2d=y19Q4rAKMUzZgkQY=tHEyxu-qyT9C6a5Q@mail.gmail.com> (raw)
In-Reply-To: <564F42CC.8090609@mentor.com>

On Fri, Nov 20, 2015 at 4:57 PM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> [ was: Re: [PATCH] Fix parloops gimple_uid usage ]
>
> On 09/10/15 23:09, Tom de Vries wrote:
>>
>> @@ -2392,6 +2397,9 @@ gather_scalar_reductions (loop_p loop,
>> reduction_info_table_type *reduction_list
>>     loop_vec_info simple_inner_loop_info = NULL;
>>     bool allow_double_reduc = true;
>>
>> +  if (!stmt_vec_info_vec.exists ())
>> +    init_stmt_vec_info_vec ();
>> +
>>     simple_loop_info = vect_analyze_loop_form (loop);
>>     if (simple_loop_info == NULL)
>>       return;
>> @@ -2453,9 +2461,16 @@ gather_scalar_reductions (loop_p loop,
>> reduction_info_table_type *reduction_list
>>     destroy_loop_vec_info (simple_loop_info, true);
>>     destroy_loop_vec_info (simple_inner_loop_info, true);
>>
>> +  /* Release the claim on gimple_uid.  */
>> +  free_stmt_vec_info_vec ();
>> +
>
>
> With the src/libgomp/testsuite/libgomp.c/pr46886.c testcase, compiled in
> addition with -ftree-vectorize, I ran into an ICE:
> ...
> src/libgomp/testsuite/libgomp.c/pr46886.c:8:5: internal compiler error: in
> init_stmt_vec_info_vec, at tree-vect-stmts.c:8250
>  int foo (void)
>      ^~~
>
> 0x1196082 init_stmt_vec_info_vec()
>         src/gcc/tree-vect-stmts.c:8250
> 0x11c3ed4 vectorize_loops()
>         src/gcc/tree-vectorizer.c:510
> 0x10a7ea5 execute
>         src/gcc/tree-ssa-loop.c:276
> ...
>
> The ICE is caused by the fact that init_stmt_vec_info_vec is called at the
> start of vectorize_loops, while stmt_vec_info_vec is not empty. I traced
> this back to gather_scalar_reduction, where we call init_stmt_vec_info_vec,
> but we skip free_stmt_vec_info_vec if we take the early-out for
> simple_loop_info == NULL.
>
> This patch fixes the ICE by making sure we always call
> free_stmt_vec_info_vec in gather_scalar_reduction.
>
> Passes cc1/f951 rebuild and autopar testing.
>
> OK for stage3 trunk if bootstrap and regtest succeeds?

Ok.

Richard.

> Thanks,
> - Tom

      reply	other threads:[~2015-11-23  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 21:11 [PATCH] Fix parloops gimple_uid usage Tom de Vries
2015-10-12 10:04 ` Richard Biener
2015-11-20 15:57 ` [PATCH, PR68460] Always call free_stmt_vec_info_vec in gather_scalar_reductions Tom de Vries
2015-11-23  9:43   ` Richard Biener [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc24redGcv2d=y19Q4rAKMUzZgkQY=tHEyxu-qyT9C6a5Q@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=Tom_deVries@mentor.com \
    --cc=gcc-patches@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).