invoke.texi: Document -scev dump modifier.

2011-06-29  Richard Guenther  <rguenther@suse.de>

	* doc/invoke.texi: Document -scev dump modifier.
	* tree-pass.h (TDF_SCEV): New dump flag.
	* tree-dump.c (dump_option_value_in): Add scev.
	* tree-chrec.c: Replace all TDF_DETAILS checks with TDF_SCEV.
	* tree-scalar-evolution.c: Likewise.

	* gcc.dg/tree-ssa/loop-17.c: Adjust.

From-SVN: r175642
This commit is contained in:
Richard Guenther 2011-06-29 14:29:22 +00:00 committed by Richard Biener
parent 3a86cfeb42
commit dfedbe4055
8 changed files with 37 additions and 21 deletions

View File

@ -1,3 +1,11 @@
2011-06-29 Richard Guenther <rguenther@suse.de>
* doc/invoke.texi: Document -scev dump modifier.
* tree-pass.h (TDF_SCEV): New dump flag.
* tree-dump.c (dump_option_value_in): Add scev.
* tree-chrec.c: Replace all TDF_DETAILS checks with TDF_SCEV.
* tree-scalar-evolution.c: Likewise.
2011-06-29 Nathan Sidwell <nathan@codesourcery.com>
* config/arm/unwind-arm.c (enum __cxa_type_match_result): New.

View File

@ -5559,6 +5559,8 @@ Enable showing the unique ID (@code{DECL_UID}) for each variable.
Enable showing the tree dump for each statement.
@item eh
Enable showing the EH region number holding each statement.
@item scev
Enable showing scalar evolution analysis details.
@item all
Turn on all options, except @option{raw}, @option{slim}, @option{verbose}
and @option{lineno}.

View File

@ -1,3 +1,7 @@
2011-06-29 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/loop-17.c: Adjust.
2011-06-29 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/initlist-value2.C: New.

View File

@ -15,5 +15,5 @@ int foo (int *p)
return i;
}
/* { dg-final { scan-tree-dump "set_nb_iterations_in_loop = 1" "sccp" } } */
/* { dg-final { scan-tree-dump "# of iterations 1, bounded by 1" "sccp" } } */
/* { dg-final { cleanup-tree-dump "sccp" } } */

View File

@ -587,7 +587,7 @@ chrec_apply (unsigned var,
|| chrec_contains_symbols_defined_in_loop (chrec, var))
return chrec_dont_know;
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
fprintf (dump_file, "(chrec_apply \n");
if (TREE_CODE (x) == INTEGER_CST && SCALAR_FLOAT_TYPE_P (type))
@ -628,7 +628,7 @@ chrec_apply (unsigned var,
break;
}
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, " (varying_loop = %d\n", var);
fprintf (dump_file, ")\n (chrec = ");

View File

@ -823,9 +823,10 @@ static const struct dump_option_value_info dump_options[] =
{"alias", TDF_ALIAS},
{"nouid", TDF_NOUID},
{"enumerate_locals", TDF_ENUMERATE_LOCALS},
{"scev", TDF_SCEV},
{"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA
| TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE
| TDF_RHS_ONLY | TDF_NOUID | TDF_ENUMERATE_LOCALS)},
| TDF_RHS_ONLY | TDF_NOUID | TDF_ENUMERATE_LOCALS | TDF_SCEV)},
{NULL, 0}
};

View File

@ -83,6 +83,7 @@ enum tree_dump_index
#define TDF_ALIAS (1 << 21) /* display alias information */
#define TDF_ENUMERATE_LOCALS (1 << 22) /* Enumerate locals by uid. */
#define TDF_CSELIB (1 << 23) /* Dump cselib details. */
#define TDF_SCEV (1 << 24) /* Dump SCEV details. */
/* In tree-dump.c */

View File

@ -572,7 +572,7 @@ set_scalar_evolution (basic_block instantiated_below, tree scalar, tree chrec)
if (dump_file)
{
if (dump_flags & TDF_DETAILS)
if (dump_flags & TDF_SCEV)
{
fprintf (dump_file, "(set_scalar_evolution \n");
fprintf (dump_file, " instantiated_below = %d \n",
@ -600,7 +600,7 @@ get_scalar_evolution (basic_block instantiated_below, tree scalar)
if (dump_file)
{
if (dump_flags & TDF_DETAILS)
if (dump_flags & TDF_SCEV)
{
fprintf (dump_file, "(get_scalar_evolution \n");
fprintf (dump_file, " (scalar = ");
@ -628,7 +628,7 @@ get_scalar_evolution (basic_block instantiated_below, tree scalar)
break;
}
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, " (scalar_evolution = ");
print_generic_expr (dump_file, res, 0);
@ -861,7 +861,7 @@ add_to_evolution (unsigned loop_nb, tree chrec_before, enum tree_code code,
/* This should not happen. */
return chrec_dont_know;
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, "(add_to_evolution \n");
fprintf (dump_file, " (loop_nb = %d)\n", loop_nb);
@ -879,7 +879,7 @@ add_to_evolution (unsigned loop_nb, tree chrec_before, enum tree_code code,
res = add_to_evolution_1 (loop_nb, chrec_before, to_add, at_stmt);
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, " (res = ");
print_generic_expr (dump_file, res, 0);
@ -905,7 +905,7 @@ get_loop_exit_condition (const struct loop *loop)
gimple res = NULL;
edge exit_edge = single_exit (loop);
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
fprintf (dump_file, "(get_loop_exit_condition \n ");
if (exit_edge)
@ -917,7 +917,7 @@ get_loop_exit_condition (const struct loop *loop)
res = stmt;
}
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
print_gimple_stmt (dump_file, res, 0, 0);
fprintf (dump_file, ")\n");
@ -1461,7 +1461,7 @@ analyze_evolution_in_loop (gimple loop_phi_node,
struct loop *loop = loop_containing_stmt (loop_phi_node);
basic_block bb;
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, "(analyze_evolution_in_loop \n");
fprintf (dump_file, " (loop_phi_node = ");
@ -1517,7 +1517,7 @@ analyze_evolution_in_loop (gimple loop_phi_node,
evolution_function = chrec_merge (evolution_function, ev_fn);
}
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, " (evolution_function = ");
print_generic_expr (dump_file, evolution_function, 0);
@ -1541,7 +1541,7 @@ analyze_initial_condition (gimple loop_phi_node)
tree init_cond = chrec_not_analyzed_yet;
struct loop *loop = loop_containing_stmt (loop_phi_node);
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, "(analyze_initial_condition \n");
fprintf (dump_file, " (loop_phi_node = \n");
@ -1593,7 +1593,7 @@ analyze_initial_condition (gimple loop_phi_node)
init_cond = res;
}
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, " (init_cond = ");
print_generic_expr (dump_file, init_cond, 0);
@ -1942,7 +1942,7 @@ analyze_scalar_evolution (struct loop *loop, tree var)
{
tree res;
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, "(analyze_scalar_evolution \n");
fprintf (dump_file, " (loop_nb = %d)\n", loop->num);
@ -1954,7 +1954,7 @@ analyze_scalar_evolution (struct loop *loop, tree var)
res = get_scalar_evolution (block_before_loop (loop), var);
res = analyze_scalar_evolution_1 (loop, var, res);
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
fprintf (dump_file, ")\n");
return res;
@ -2700,7 +2700,7 @@ instantiate_scev (basic_block instantiate_below, struct loop *evolution_loop,
tree res;
htab_t cache = htab_create (10, hash_scev_info, eq_scev_info, del_scev_info);
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, "(instantiate_scev \n");
fprintf (dump_file, " (instantiate_below = %d)\n", instantiate_below->index);
@ -2713,7 +2713,7 @@ instantiate_scev (basic_block instantiate_below, struct loop *evolution_loop,
res = instantiate_scev_r (instantiate_below, evolution_loop, chrec, false,
cache, 0);
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, " (res = ");
print_generic_expr (dump_file, res, 0);
@ -2779,7 +2779,7 @@ number_of_latch_executions (struct loop *loop)
may_be_zero = NULL_TREE;
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
fprintf (dump_file, "(number_of_iterations_in_loop = \n");
res = chrec_dont_know;
@ -2804,7 +2804,7 @@ number_of_latch_executions (struct loop *loop)
else
res = chrec_dont_know;
if (dump_file && (dump_flags & TDF_DETAILS))
if (dump_file && (dump_flags & TDF_SCEV))
{
fprintf (dump_file, " (set_nb_iterations_in_loop = ");
print_generic_expr (dump_file, res, 0);