Commit dfedbe40 by Richard Guenther Committed by Richard Biener

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
parent 3a86cfeb
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> 2011-06-29 Nathan Sidwell <nathan@codesourcery.com>
* config/arm/unwind-arm.c (enum __cxa_type_match_result): New. * config/arm/unwind-arm.c (enum __cxa_type_match_result): New.
......
...@@ -5559,6 +5559,8 @@ Enable showing the unique ID (@code{DECL_UID}) for each variable. ...@@ -5559,6 +5559,8 @@ Enable showing the unique ID (@code{DECL_UID}) for each variable.
Enable showing the tree dump for each statement. Enable showing the tree dump for each statement.
@item eh @item eh
Enable showing the EH region number holding each statement. Enable showing the EH region number holding each statement.
@item scev
Enable showing scalar evolution analysis details.
@item all @item all
Turn on all options, except @option{raw}, @option{slim}, @option{verbose} Turn on all options, except @option{raw}, @option{slim}, @option{verbose}
and @option{lineno}. and @option{lineno}.
......
2011-06-29 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/loop-17.c: Adjust.
2011-06-29 Jason Merrill <jason@redhat.com> 2011-06-29 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/initlist-value2.C: New. * g++.dg/cpp0x/initlist-value2.C: New.
......
...@@ -15,5 +15,5 @@ int foo (int *p) ...@@ -15,5 +15,5 @@ int foo (int *p)
return i; 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" } } */ /* { dg-final { cleanup-tree-dump "sccp" } } */
...@@ -587,7 +587,7 @@ chrec_apply (unsigned var, ...@@ -587,7 +587,7 @@ chrec_apply (unsigned var,
|| chrec_contains_symbols_defined_in_loop (chrec, var)) || chrec_contains_symbols_defined_in_loop (chrec, var))
return chrec_dont_know; return chrec_dont_know;
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_SCEV))
fprintf (dump_file, "(chrec_apply \n"); fprintf (dump_file, "(chrec_apply \n");
if (TREE_CODE (x) == INTEGER_CST && SCALAR_FLOAT_TYPE_P (type)) if (TREE_CODE (x) == INTEGER_CST && SCALAR_FLOAT_TYPE_P (type))
...@@ -628,7 +628,7 @@ chrec_apply (unsigned var, ...@@ -628,7 +628,7 @@ chrec_apply (unsigned var,
break; 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, " (varying_loop = %d\n", var);
fprintf (dump_file, ")\n (chrec = "); fprintf (dump_file, ")\n (chrec = ");
......
...@@ -823,9 +823,10 @@ static const struct dump_option_value_info dump_options[] = ...@@ -823,9 +823,10 @@ static const struct dump_option_value_info dump_options[] =
{"alias", TDF_ALIAS}, {"alias", TDF_ALIAS},
{"nouid", TDF_NOUID}, {"nouid", TDF_NOUID},
{"enumerate_locals", TDF_ENUMERATE_LOCALS}, {"enumerate_locals", TDF_ENUMERATE_LOCALS},
{"scev", TDF_SCEV},
{"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA
| TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE | 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} {NULL, 0}
}; };
......
...@@ -83,6 +83,7 @@ enum tree_dump_index ...@@ -83,6 +83,7 @@ enum tree_dump_index
#define TDF_ALIAS (1 << 21) /* display alias information */ #define TDF_ALIAS (1 << 21) /* display alias information */
#define TDF_ENUMERATE_LOCALS (1 << 22) /* Enumerate locals by uid. */ #define TDF_ENUMERATE_LOCALS (1 << 22) /* Enumerate locals by uid. */
#define TDF_CSELIB (1 << 23) /* Dump cselib details. */ #define TDF_CSELIB (1 << 23) /* Dump cselib details. */
#define TDF_SCEV (1 << 24) /* Dump SCEV details. */
/* In tree-dump.c */ /* In tree-dump.c */
......
...@@ -572,7 +572,7 @@ set_scalar_evolution (basic_block instantiated_below, tree scalar, tree chrec) ...@@ -572,7 +572,7 @@ set_scalar_evolution (basic_block instantiated_below, tree scalar, tree chrec)
if (dump_file) if (dump_file)
{ {
if (dump_flags & TDF_DETAILS) if (dump_flags & TDF_SCEV)
{ {
fprintf (dump_file, "(set_scalar_evolution \n"); fprintf (dump_file, "(set_scalar_evolution \n");
fprintf (dump_file, " instantiated_below = %d \n", fprintf (dump_file, " instantiated_below = %d \n",
...@@ -600,7 +600,7 @@ get_scalar_evolution (basic_block instantiated_below, tree scalar) ...@@ -600,7 +600,7 @@ get_scalar_evolution (basic_block instantiated_below, tree scalar)
if (dump_file) if (dump_file)
{ {
if (dump_flags & TDF_DETAILS) if (dump_flags & TDF_SCEV)
{ {
fprintf (dump_file, "(get_scalar_evolution \n"); fprintf (dump_file, "(get_scalar_evolution \n");
fprintf (dump_file, " (scalar = "); fprintf (dump_file, " (scalar = ");
...@@ -628,7 +628,7 @@ get_scalar_evolution (basic_block instantiated_below, tree scalar) ...@@ -628,7 +628,7 @@ get_scalar_evolution (basic_block instantiated_below, tree scalar)
break; break;
} }
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_SCEV))
{ {
fprintf (dump_file, " (scalar_evolution = "); fprintf (dump_file, " (scalar_evolution = ");
print_generic_expr (dump_file, res, 0); print_generic_expr (dump_file, res, 0);
...@@ -861,7 +861,7 @@ add_to_evolution (unsigned loop_nb, tree chrec_before, enum tree_code code, ...@@ -861,7 +861,7 @@ add_to_evolution (unsigned loop_nb, tree chrec_before, enum tree_code code,
/* This should not happen. */ /* This should not happen. */
return chrec_dont_know; 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, "(add_to_evolution \n");
fprintf (dump_file, " (loop_nb = %d)\n", loop_nb); 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, ...@@ -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); 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 = "); fprintf (dump_file, " (res = ");
print_generic_expr (dump_file, res, 0); print_generic_expr (dump_file, res, 0);
...@@ -905,7 +905,7 @@ get_loop_exit_condition (const struct loop *loop) ...@@ -905,7 +905,7 @@ get_loop_exit_condition (const struct loop *loop)
gimple res = NULL; gimple res = NULL;
edge exit_edge = single_exit (loop); 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 "); fprintf (dump_file, "(get_loop_exit_condition \n ");
if (exit_edge) if (exit_edge)
...@@ -917,7 +917,7 @@ get_loop_exit_condition (const struct loop *loop) ...@@ -917,7 +917,7 @@ get_loop_exit_condition (const struct loop *loop)
res = stmt; res = stmt;
} }
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_SCEV))
{ {
print_gimple_stmt (dump_file, res, 0, 0); print_gimple_stmt (dump_file, res, 0, 0);
fprintf (dump_file, ")\n"); fprintf (dump_file, ")\n");
...@@ -1461,7 +1461,7 @@ analyze_evolution_in_loop (gimple loop_phi_node, ...@@ -1461,7 +1461,7 @@ analyze_evolution_in_loop (gimple loop_phi_node,
struct loop *loop = loop_containing_stmt (loop_phi_node); struct loop *loop = loop_containing_stmt (loop_phi_node);
basic_block bb; 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, "(analyze_evolution_in_loop \n");
fprintf (dump_file, " (loop_phi_node = "); fprintf (dump_file, " (loop_phi_node = ");
...@@ -1517,7 +1517,7 @@ analyze_evolution_in_loop (gimple loop_phi_node, ...@@ -1517,7 +1517,7 @@ analyze_evolution_in_loop (gimple loop_phi_node,
evolution_function = chrec_merge (evolution_function, ev_fn); 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 = "); fprintf (dump_file, " (evolution_function = ");
print_generic_expr (dump_file, evolution_function, 0); print_generic_expr (dump_file, evolution_function, 0);
...@@ -1541,7 +1541,7 @@ analyze_initial_condition (gimple loop_phi_node) ...@@ -1541,7 +1541,7 @@ analyze_initial_condition (gimple loop_phi_node)
tree init_cond = chrec_not_analyzed_yet; tree init_cond = chrec_not_analyzed_yet;
struct loop *loop = loop_containing_stmt (loop_phi_node); 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, "(analyze_initial_condition \n");
fprintf (dump_file, " (loop_phi_node = \n"); fprintf (dump_file, " (loop_phi_node = \n");
...@@ -1593,7 +1593,7 @@ analyze_initial_condition (gimple loop_phi_node) ...@@ -1593,7 +1593,7 @@ analyze_initial_condition (gimple loop_phi_node)
init_cond = res; init_cond = res;
} }
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_SCEV))
{ {
fprintf (dump_file, " (init_cond = "); fprintf (dump_file, " (init_cond = ");
print_generic_expr (dump_file, init_cond, 0); print_generic_expr (dump_file, init_cond, 0);
...@@ -1942,7 +1942,7 @@ analyze_scalar_evolution (struct loop *loop, tree var) ...@@ -1942,7 +1942,7 @@ analyze_scalar_evolution (struct loop *loop, tree var)
{ {
tree res; 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, "(analyze_scalar_evolution \n");
fprintf (dump_file, " (loop_nb = %d)\n", loop->num); fprintf (dump_file, " (loop_nb = %d)\n", loop->num);
...@@ -1954,7 +1954,7 @@ analyze_scalar_evolution (struct loop *loop, tree var) ...@@ -1954,7 +1954,7 @@ analyze_scalar_evolution (struct loop *loop, tree var)
res = get_scalar_evolution (block_before_loop (loop), var); res = get_scalar_evolution (block_before_loop (loop), var);
res = analyze_scalar_evolution_1 (loop, var, res); 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"); fprintf (dump_file, ")\n");
return res; return res;
...@@ -2700,7 +2700,7 @@ instantiate_scev (basic_block instantiate_below, struct loop *evolution_loop, ...@@ -2700,7 +2700,7 @@ instantiate_scev (basic_block instantiate_below, struct loop *evolution_loop,
tree res; tree res;
htab_t cache = htab_create (10, hash_scev_info, eq_scev_info, del_scev_info); 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_scev \n");
fprintf (dump_file, " (instantiate_below = %d)\n", instantiate_below->index); fprintf (dump_file, " (instantiate_below = %d)\n", instantiate_below->index);
...@@ -2713,7 +2713,7 @@ instantiate_scev (basic_block instantiate_below, struct loop *evolution_loop, ...@@ -2713,7 +2713,7 @@ instantiate_scev (basic_block instantiate_below, struct loop *evolution_loop,
res = instantiate_scev_r (instantiate_below, evolution_loop, chrec, false, res = instantiate_scev_r (instantiate_below, evolution_loop, chrec, false,
cache, 0); cache, 0);
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_SCEV))
{ {
fprintf (dump_file, " (res = "); fprintf (dump_file, " (res = ");
print_generic_expr (dump_file, res, 0); print_generic_expr (dump_file, res, 0);
...@@ -2779,7 +2779,7 @@ number_of_latch_executions (struct loop *loop) ...@@ -2779,7 +2779,7 @@ number_of_latch_executions (struct loop *loop)
may_be_zero = NULL_TREE; 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"); fprintf (dump_file, "(number_of_iterations_in_loop = \n");
res = chrec_dont_know; res = chrec_dont_know;
...@@ -2804,7 +2804,7 @@ number_of_latch_executions (struct loop *loop) ...@@ -2804,7 +2804,7 @@ number_of_latch_executions (struct loop *loop)
else else
res = chrec_dont_know; 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 = "); fprintf (dump_file, " (set_nb_iterations_in_loop = ");
print_generic_expr (dump_file, res, 0); print_generic_expr (dump_file, res, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment