* [PATCH GCC][PR62173 partial/1]Preserve ssa name (thus vrp info) for IV structure
@ 2015-02-13 9:43 Bin Cheng
2015-02-13 10:23 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Bin Cheng @ 2015-02-13 9:43 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
Hi,
When dealing with PR62173, we found places in which overflow check on SCEVs
can be improved by range information. This patch addresses one of them.
Richard once suggested that we should trace range info all the way through
SCEV thus have it on CHREC structure. But as far as IVOPTs is concerned,
there is already the information because for each IV, we have the
corresponding ssa name field. The only problem is GCC now releases this
field to make iv dump routines easier. This is a trivial patch fixing this.
Bootstrap and test along with the other one. Is it OK?
Thanks,
bin
2015-02-13 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/62173
* tree-ssa-loop-ivopts.c (dump_iv): New parameter.
(dump_use, dump_cand, find_induction_variables): Pass new argument
to dump_iv.
(record_use): Preserve the ssa name information in IV.
[-- Attachment #2: preserve-ssa_name-in-iv-20150203.txt --]
[-- Type: text/plain, Size: 1701 bytes --]
Index: gcc/tree-ssa-loop-ivopts.c
===================================================================
--- gcc/tree-ssa-loop-ivopts.c (revision 219574)
+++ gcc/tree-ssa-loop-ivopts.c (working copy)
@@ -498,9 +498,9 @@ single_dom_exit (struct loop *loop)
/* Dumps information about the induction variable IV to FILE. */
void
-dump_iv (FILE *file, struct iv *iv)
+dump_iv (FILE *file, struct iv *iv, bool dump_name)
{
- if (iv->ssa_name)
+ if (iv->ssa_name && dump_name)
{
fprintf (file, "ssa name ");
print_generic_expr (file, iv->ssa_name, TDF_SLIM);
@@ -573,7 +573,7 @@ dump_use (FILE *file, struct iv_use *use)
print_generic_expr (file, *use->op_p, TDF_SLIM);
fprintf (file, "\n");
- dump_iv (file, use->iv);
+ dump_iv (file, use->iv, false);
if (use->related_cands)
{
@@ -657,7 +657,7 @@ dump_cand (FILE *file, struct iv_cand *cand)
break;
}
- dump_iv (file, iv);
+ dump_iv (file, iv, false);
}
/* Returns the info for ssa version VER. */
@@ -1269,7 +1269,7 @@ find_induction_variables (struct ivopts_data *data
EXECUTE_IF_SET_IN_BITMAP (data->relevant, 0, i, bi)
{
if (ver_info (data, i)->iv)
- dump_iv (dump_file, ver_info (data, i)->iv);
+ dump_iv (dump_file, ver_info (data, i)->iv, true);
}
}
@@ -1291,10 +1291,6 @@ record_use (struct ivopts_data *data, tree *use_p,
use->op_p = use_p;
use->related_cands = BITMAP_ALLOC (NULL);
- /* To avoid showing ssa name in the dumps, if it was not reset by the
- caller. */
- iv->ssa_name = NULL_TREE;
-
if (dump_file && (dump_flags & TDF_DETAILS))
dump_use (dump_file, use);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH GCC][PR62173 partial/1]Preserve ssa name (thus vrp info) for IV structure
2015-02-13 9:43 [PATCH GCC][PR62173 partial/1]Preserve ssa name (thus vrp info) for IV structure Bin Cheng
@ 2015-02-13 10:23 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2015-02-13 10:23 UTC (permalink / raw)
To: Bin Cheng; +Cc: GCC Patches
On Fri, Feb 13, 2015 at 10:43 AM, Bin Cheng <bin.cheng@arm.com> wrote:
> Hi,
> When dealing with PR62173, we found places in which overflow check on SCEVs
> can be improved by range information. This patch addresses one of them.
> Richard once suggested that we should trace range info all the way through
> SCEV thus have it on CHREC structure. But as far as IVOPTs is concerned,
> there is already the information because for each IV, we have the
> corresponding ssa name field. The only problem is GCC now releases this
> field to make iv dump routines easier. This is a trivial patch fixing this.
>
>
> Bootstrap and test along with the other one. Is it OK?
Ok.
Thanks,
Richard.
> Thanks,
> bin
>
> 2015-02-13 Bin Cheng <bin.cheng@arm.com>
>
> PR tree-optimization/62173
> * tree-ssa-loop-ivopts.c (dump_iv): New parameter.
> (dump_use, dump_cand, find_induction_variables): Pass new argument
> to dump_iv.
> (record_use): Preserve the ssa name information in IV.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-13 10:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 9:43 [PATCH GCC][PR62173 partial/1]Preserve ssa name (thus vrp info) for IV structure Bin Cheng
2015-02-13 10:23 ` 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).