aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-10-30 08:38:24 +0000
committerTom de Vries <vries@gcc.gnu.org>2015-10-30 08:38:24 +0000
commitbf74904272f65550e2741344ab6d94854af2fc6e (patch)
tree7b3d8c58fa42734c3fc0d5fb57b8704a60d3da0c /gcc/tree-ssa-structalias.c
parente28c20522742a9782f6468551f11e3266ea2f823 (diff)
downloadgcc-bf74904272f65550e2741344ab6d94854af2fc6e.zip
gcc-bf74904272f65550e2741344ab6d94854af2fc6e.tar.gz
gcc-bf74904272f65550e2741344ab6d94854af2fc6e.tar.bz2
Cleanup fipa-pta constraint dumping
2015-10-30 Tom de Vries <tom@codesourcery.com> * tree-ssa-structalias.c (ipa_pta_execute): Declare variable from as unsigned, and initialize, and use initial value instead of hardcoded constant. Add generic constraints dumping section. Don't dump global initializers constraints dumping section if empty. Don't update variable from if unused. From-SVN: r229569
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 9798713..55608ef 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -7284,7 +7284,7 @@ ipa_pta_execute (void)
{
struct cgraph_node *node;
varpool_node *var;
- int from;
+ unsigned int from = 0;
in_ipa_mode = 1;
@@ -7296,6 +7296,14 @@ ipa_pta_execute (void)
fprintf (dump_file, "\n");
}
+ if (dump_file)
+ {
+ fprintf (dump_file, "Generating generic constraints\n\n");
+ dump_constraints (dump_file, from);
+ fprintf (dump_file, "\n");
+ from = constraints.length ();
+ }
+
/* Build the constraints. */
FOR_EACH_DEFINED_FUNCTION (node)
{
@@ -7324,14 +7332,15 @@ ipa_pta_execute (void)
get_vi_for_tree (var->decl);
}
- if (dump_file)
+ if (dump_file
+ && from != constraints.length ())
{
fprintf (dump_file,
"Generating constraints for global initializers\n\n");
- dump_constraints (dump_file, 0);
+ dump_constraints (dump_file, from);
fprintf (dump_file, "\n");
+ from = constraints.length ();
}
- from = constraints.length ();
FOR_EACH_DEFINED_FUNCTION (node)
{
@@ -7416,8 +7425,8 @@ ipa_pta_execute (void)
fprintf (dump_file, "\n");
dump_constraints (dump_file, from);
fprintf (dump_file, "\n");
+ from = constraints.length ();
}
- from = constraints.length ();
}
/* From the constraints compute the points-to sets. */