From: Richard Guenther <richard.guenther@gmail.com>
To: Ira Rosen <ira.rosen@linaro.org>
Cc: gcc-patches@gcc.gnu.org, Patch Tracking <patches@linaro.org>
Subject: Re: [patch] Don't insert pattern statements into the code (was Fix PR tree-optimization/49318)
Date: Tue, 14 Jun 2011 12:50:00 -0000 [thread overview]
Message-ID: <BANLkTik8_iKVHtHL7Mo9Af3LD8TAtAqFsQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikcGfVaYDp7QvhtKZ9YA0056C6EMw@mail.gmail.com>
On Tue, Jun 14, 2011 at 1:38 PM, Ira Rosen <ira.rosen@linaro.org> wrote:
> On 14 June 2011 14:27, Richard Guenther <richard.guenther@gmail.com> wrote:
>
>>>>
>>>> /* Mark the stmts that are involved in the pattern. */
>>>> - gsi_insert_before (&si, pattern_stmt, GSI_SAME_STMT);
>>>> set_vinfo_for_stmt (pattern_stmt,
>>>> new_stmt_vec_info (pattern_stmt, loop_vinfo, NULL));
>>>> + gimple_set_bb (pattern_stmt, gimple_bb (stmt));
>>>>
>>>> do you really need this?
>>>
>>> Yes, there are a lot of uses of gimple_bb (stmt). Otherwise, we'd have
>>> to check there that bb exists (or that this is not a pattern stmt) and
>>> use the bb of the original statement if not.
>>
>> I see. It's not really uglier than the part where you have to special-case
>> them when walking use-operands, so ...
>
> I think it is uglier, because there are 42 cases to handle instead of
> a single place that you mentioned. (Probably not all the 42 can be
> really reached with a pattern stmt, but still it's a lot).
Well, yes - I meant setting the BB isn't uglier which means setting BB
is ok.
Richard.
> Thanks,
> Ira
>
>>
>> Still a lot better than when inserting them for real.
>>
>>>> Otherwise it looks reasonable. Btw,
>>>> we can probably remove the simple DCE done in
>>>> slpeel_tree_peel_loop_to_edge (remove_dead_stmts_from_loop)
>>>> with this patch.
>>>
>>> I'll try that.
>>
>> Thanks,
>> Richard.
>>
>>> Thanks,
>>> Ira
>>>
>>>>
>>>> Thanks,
>>>> Richard.
>>>>
>>>>> Thanks,
>>>>> Ira
>>>>>
>>>>> ChangeLog:
>>>>>
>>>>> * tree-vect-loop.c (vect_determine_vectorization_factor): Don't
>>>>> remove irrelevant pattern statements. For irrelevant statements
>>>>> check if it is the last statement of a detected pattern, use
>>>>> corresponding pattern statement instead.
>>>>> (destroy_loop_vec_info): No need to remove pattern statements,
>>>>> only free stmt_vec_info.
>>>>> (vect_transform_loop): For irrelevant statements check if it is
>>>>> the last statement of a detected pattern, use corresponding
>>>>> pattern statement instead.
>>>>> * tree-vect-patterns.c (vect_pattern_recog_1): Don't insert
>>>>> pattern statements. Set basic block for the new statement.
>>>>> (vect_pattern_recog): Update documentation.
>>>>> * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Scan
>>>>> operands of pattern statements.
>>>>> (vectorizable_call): Fix printing. In case of a pattern statement
>>>>> use the lhs of the original statement when creating a dummy
>>>>> statement to replace the original call.
>>>>> (vect_analyze_stmt): For irrelevant statements check if it is
>>>>> the last statement of a detected pattern, use corresponding
>>>>> pattern statement instead.
>>>>> * tree-vect-slp.c (vect_schedule_slp_instance): For pattern
>>>>> statements use gsi of the original statement.
>>>>>
>>>>
>>>
>>
>
next prev parent reply other threads:[~2011-06-14 12:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-13 12:54 Ira Rosen
2011-06-14 10:05 ` Richard Guenther
2011-06-14 11:14 ` Ira Rosen
2011-06-14 11:29 ` Richard Guenther
2011-06-14 12:17 ` Ira Rosen
2011-06-14 12:50 ` Richard Guenther [this message]
2011-06-16 7:36 ` Ira Rosen
2011-06-16 10:21 ` Ira Rosen
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=BANLkTik8_iKVHtHL7Mo9Af3LD8TAtAqFsQ@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ira.rosen@linaro.org \
--cc=patches@linaro.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).