* [PATCH GCC8][18/33]Relate compare iv_use with all candidates
@ 2017-04-18 10:47 Bin Cheng
2017-04-26 13:16 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Bin Cheng @ 2017-04-18 10:47 UTC (permalink / raw)
To: gcc-patches; +Cc: nd
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
Hi,
For compare type iv_use, we want to relate it with all candidates in order
to achieve smaller candidate set. Generally this doesn't hurt compilation
time because compare iv_use is already related with most candidates and
the number of compare iv_uses is also small.
Is it OK?
Thanks,
bin
2017-04-11 Bin Cheng <bin.cheng@arm.com>
* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
(find_iv_candidates): Call relate_compare_use_with_all_cands.
[-- Attachment #2: 0018-relate-comp_use-with-all-cands-20170312.txt --]
[-- Type: text/plain, Size: 1433 bytes --]
From 05d21bf9421fb312a3470eb232bf98cd16d072a6 Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Thu, 6 Apr 2017 10:09:18 +0100
Subject: [PATCH 18/33] relate-comp_use-with-all-cands-20170312.txt
---
gcc/tree-ssa-loop-ivopts.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 2c6fa76..0f78a46 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5250,6 +5250,21 @@ set_autoinc_for_original_candidates (struct ivopts_data *data)
}
}
+/* Relate compare use with all candidates. */
+
+static void
+relate_compare_use_with_all_cands (struct ivopts_data *data)
+{
+ unsigned i, max_id = data->vcands.length () - 1;
+ for (i = 0; i < data->vgroups.length (); i++)
+ {
+ struct iv_group *group = data->vgroups[i];
+
+ if (group->type == USE_COMPARE)
+ bitmap_set_range (group->related_cands, 0, max_id);
+ }
+}
+
/* Finds the candidates for the induction variables. */
static void
@@ -5269,6 +5284,10 @@ find_iv_candidates (struct ivopts_data *data)
/* Record the important candidates. */
record_important_candidates (data);
+ /* Relate compare iv_use with all candidates. */
+ if (!data->consider_all_candidates)
+ relate_compare_use_with_all_cands (data);
+
if (dump_file && (dump_flags & TDF_DETAILS))
{
unsigned i;
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH GCC8][18/33]Relate compare iv_use with all candidates
2017-04-18 10:47 [PATCH GCC8][18/33]Relate compare iv_use with all candidates Bin Cheng
@ 2017-04-26 13:16 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2017-04-26 13:16 UTC (permalink / raw)
To: Bin Cheng; +Cc: gcc-patches, nd
On Tue, Apr 18, 2017 at 12:46 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> For compare type iv_use, we want to relate it with all candidates in order
> to achieve smaller candidate set. Generally this doesn't hurt compilation
> time because compare iv_use is already related with most candidates and
> the number of compare iv_uses is also small.
> Is it OK?
Ok.
Richard.
> Thanks,
> bin
> 2017-04-11 Bin Cheng <bin.cheng@arm.com>
>
> * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
> (find_iv_candidates): Call relate_compare_use_with_all_cands.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-26 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 10:47 [PATCH GCC8][18/33]Relate compare iv_use with all candidates Bin Cheng
2017-04-26 13:16 ` Richard Biener
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).