diff mbox series

IPA mod-ref: fix usage of --param names in dump messages.

Message ID 0adb07f4-1334-468d-f688-c8f2732c8ad5@suse.cz
State New
Headers show
Series IPA mod-ref: fix usage of --param names in dump messages. | expand

Commit Message

Martin Liška Jan. 26, 2022, 2:49 p.m. UTC
The patch fixed bad --param param=foo names.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

	* ipa-modref-tree.cc (modref_access_node::update):
	Remove "--param param=foo" with "--param foo".
	(modref_access_node::insert): Likewise.
	(modref_access_node::insert_kill): Likewise.
	* ipa-modref-tree.h (struct modref_ref_node): Likewise.
	(struct modref_base_node): Likewise.
	(struct modref_tree): Likewise.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/modref-7.c: Update scanned patterns.
	* gcc.dg/tree-ssa/modref-8.c: Likewise.
---
  gcc/ipa-modref-tree.cc                   | 10 ++++------
  gcc/ipa-modref-tree.h                    |  9 ++++-----
  gcc/testsuite/gcc.dg/tree-ssa/modref-7.c |  2 +-
  gcc/testsuite/gcc.dg/tree-ssa/modref-8.c |  4 ++--
  4 files changed, 11 insertions(+), 14 deletions(-)

Comments

Richard Biener Jan. 26, 2022, 3:24 p.m. UTC | #1
On Wed, Jan 26, 2022 at 3:49 PM Martin Liška <mliska@suse.cz> wrote:
>
> The patch fixed bad --param param=foo names.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?

OK.

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>         * ipa-modref-tree.cc (modref_access_node::update):
>         Remove "--param param=foo" with "--param foo".
>         (modref_access_node::insert): Likewise.
>         (modref_access_node::insert_kill): Likewise.
>         * ipa-modref-tree.h (struct modref_ref_node): Likewise.
>         (struct modref_base_node): Likewise.
>         (struct modref_tree): Likewise.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.dg/tree-ssa/modref-7.c: Update scanned patterns.
>         * gcc.dg/tree-ssa/modref-8.c: Likewise.
> ---
>   gcc/ipa-modref-tree.cc                   | 10 ++++------
>   gcc/ipa-modref-tree.h                    |  9 ++++-----
>   gcc/testsuite/gcc.dg/tree-ssa/modref-7.c |  2 +-
>   gcc/testsuite/gcc.dg/tree-ssa/modref-8.c |  4 ++--
>   4 files changed, 11 insertions(+), 14 deletions(-)
>
> diff --git a/gcc/ipa-modref-tree.cc b/gcc/ipa-modref-tree.cc
> index 97e497accf2..828994f3536 100644
> --- a/gcc/ipa-modref-tree.cc
> +++ b/gcc/ipa-modref-tree.cc
> @@ -130,8 +130,7 @@ modref_access_node::update (poly_int64 parm_offset1,
>     else
>       {
>         if (dump_file)
> -       fprintf (dump_file,
> -                "--param param=modref-max-adjustments limit reached:");
> +       fprintf (dump_file, "--param modref-max-adjustments limit reached:");
>         if (!known_eq (parm_offset, parm_offset1))
>         {
>           if (dump_file)
> @@ -594,11 +593,11 @@ modref_access_node::insert (vec <modref_access_node, va_gc> *&accesses,
>         return -1;
>         if (dump_file && best2 >= 0)
>         fprintf (dump_file,
> -                "--param param=modref-max-accesses limit reached;"
> +                "--param modref-max-accesses limit reached;"
>                  " merging %i and %i\n", best1, best2);
>         else if (dump_file)
>         fprintf (dump_file,
> -                "--param param=modref-max-accesses limit reached;"
> +                "--param modref-max-accesses limit reached;"
>                  " merging with %i\n", best1);
>         modref_access_node::try_merge_with (accesses, best1);
>         if (best2 >= 0)
> @@ -825,8 +824,7 @@ modref_access_node::insert_kill (vec<modref_access_node> &kills,
>         if ((int)kills.length () >= param_modref_max_accesses)
>         {
>           if (dump_file)
> -           fprintf (dump_file,
> -                    "--param param=modref-max-accesses limit reached:");
> +           fprintf (dump_file, "--param modref-max-accesses limit reached:");
>           return false;
>         }
>         a.adjustments = 0;
> diff --git a/gcc/ipa-modref-tree.h b/gcc/ipa-modref-tree.h
> index edb3b49374a..fdaa9612e9a 100644
> --- a/gcc/ipa-modref-tree.h
> +++ b/gcc/ipa-modref-tree.h
> @@ -197,8 +197,7 @@ struct GTY((user)) modref_ref_node
>         {
>         if (dump_file)
>           fprintf (dump_file,
> -                  "--param param=modref-max-accesses limit reached;"
> -                  " collapsing\n");
> +                  "--param modref-max-accesses limit reached; collapsing\n");
>         collapse ();
>         }
>       return ret != 0;
> @@ -252,7 +251,7 @@ struct GTY((user)) modref_base_node
>       if (ref && refs && refs->length () >= max_refs)
>         {
>         if (dump_file)
> -         fprintf (dump_file, "--param param=modref-max-refs limit reached;"
> +         fprintf (dump_file, "--param modref-max-refs limit reached;"
>                    " using 0\n");
>         ref = 0;
>         ref_node = search (ref);
> @@ -344,12 +343,12 @@ struct GTY((user)) modref_tree
>         if (base_node)
>           {
>             if (dump_file)
> -             fprintf (dump_file, "--param param=modref-max-bases"
> +             fprintf (dump_file, "--param modref-max-bases"
>                        " limit reached; using ref\n");
>             return base_node;
>           }
>         if (dump_file)
> -         fprintf (dump_file, "--param param=modref-max-bases"
> +         fprintf (dump_file, "--param modref-max-bases"
>                    " limit reached; using 0\n");
>         base = 0;
>         base_node = search (base);
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
> index 53ffa1c394c..b55d7066b22 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
> @@ -10,4 +10,4 @@ int test(struct a *a, int p)
>     a->array[0] = 1;
>   }
>   /* All three accesses combine to one bigger access.  */
> -/* { dg-final { scan-tree-dump-not "param=modref-max-accesses" "modref1" } } */
> +/* { dg-final { scan-tree-dump-not "--param modref-max-accesses" "modref1" } } */
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
> index 4a18e34cd16..c51590ff0ba 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
> @@ -17,8 +17,8 @@ recurse (char *p, int n)
>         if (n)
>           recurse (p+1,n-1);
>   }
> -/* { dg-final { scan-tree-dump-not "param=modref-max-accesses" "modref1" } } */
> -/* { dg-final { scan-tree-dump "param=modref-max-adjustments" "modref1" } } */
> +/* { dg-final { scan-tree-dump-not "--param modref-max-accesses" "modref1" } } */
> +/* { dg-final { scan-tree-dump "--param modref-max-adjustments" "modref1" } } */
>   /* In set all accesses should merge together.  */
>   /* { dg-final { scan-tree-dump "access: Parm 0 param offset:0 offset:0 size:8 max_size:40" "modref1" } } */
>   /* In recurse we should cap the recrusion after 8 attempts and set max_size to -1.  */
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/gcc/ipa-modref-tree.cc b/gcc/ipa-modref-tree.cc
index 97e497accf2..828994f3536 100644
--- a/gcc/ipa-modref-tree.cc
+++ b/gcc/ipa-modref-tree.cc
@@ -130,8 +130,7 @@  modref_access_node::update (poly_int64 parm_offset1,
    else
      {
        if (dump_file)
-	fprintf (dump_file,
-		 "--param param=modref-max-adjustments limit reached:");
+	fprintf (dump_file, "--param modref-max-adjustments limit reached:");
        if (!known_eq (parm_offset, parm_offset1))
  	{
  	  if (dump_file)
@@ -594,11 +593,11 @@  modref_access_node::insert (vec <modref_access_node, va_gc> *&accesses,
  	return -1;
        if (dump_file && best2 >= 0)
  	fprintf (dump_file,
-		 "--param param=modref-max-accesses limit reached;"
+		 "--param modref-max-accesses limit reached;"
  		 " merging %i and %i\n", best1, best2);
        else if (dump_file)
  	fprintf (dump_file,
-		 "--param param=modref-max-accesses limit reached;"
+		 "--param modref-max-accesses limit reached;"
  		 " merging with %i\n", best1);
        modref_access_node::try_merge_with (accesses, best1);
        if (best2 >= 0)
@@ -825,8 +824,7 @@  modref_access_node::insert_kill (vec<modref_access_node> &kills,
        if ((int)kills.length () >= param_modref_max_accesses)
  	{
  	  if (dump_file)
-	    fprintf (dump_file,
-		     "--param param=modref-max-accesses limit reached:");
+	    fprintf (dump_file, "--param modref-max-accesses limit reached:");
  	  return false;
  	}
        a.adjustments = 0;
diff --git a/gcc/ipa-modref-tree.h b/gcc/ipa-modref-tree.h
index edb3b49374a..fdaa9612e9a 100644
--- a/gcc/ipa-modref-tree.h
+++ b/gcc/ipa-modref-tree.h
@@ -197,8 +197,7 @@  struct GTY((user)) modref_ref_node
        {
  	if (dump_file)
  	  fprintf (dump_file,
-		   "--param param=modref-max-accesses limit reached;"
-		   " collapsing\n");
+		   "--param modref-max-accesses limit reached; collapsing\n");
  	collapse ();
        }
      return ret != 0;
@@ -252,7 +251,7 @@  struct GTY((user)) modref_base_node
      if (ref && refs && refs->length () >= max_refs)
        {
  	if (dump_file)
-	  fprintf (dump_file, "--param param=modref-max-refs limit reached;"
+	  fprintf (dump_file, "--param modref-max-refs limit reached;"
  		   " using 0\n");
  	ref = 0;
  	ref_node = search (ref);
@@ -344,12 +343,12 @@  struct GTY((user)) modref_tree
  	if (base_node)
  	  {
  	    if (dump_file)
-	      fprintf (dump_file, "--param param=modref-max-bases"
+	      fprintf (dump_file, "--param modref-max-bases"
  		       " limit reached; using ref\n");
  	    return base_node;
  	  }
  	if (dump_file)
-	  fprintf (dump_file, "--param param=modref-max-bases"
+	  fprintf (dump_file, "--param modref-max-bases"
  		   " limit reached; using 0\n");
  	base = 0;
  	base_node = search (base);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
index 53ffa1c394c..b55d7066b22 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-7.c
@@ -10,4 +10,4 @@  int test(struct a *a, int p)
    a->array[0] = 1;
  }
  /* All three accesses combine to one bigger access.  */
-/* { dg-final { scan-tree-dump-not "param=modref-max-accesses" "modref1" } } */
+/* { dg-final { scan-tree-dump-not "--param modref-max-accesses" "modref1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
index 4a18e34cd16..c51590ff0ba 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-8.c
@@ -17,8 +17,8 @@  recurse (char *p, int n)
  	if (n)
  	  recurse (p+1,n-1);
  }
-/* { dg-final { scan-tree-dump-not "param=modref-max-accesses" "modref1" } } */
-/* { dg-final { scan-tree-dump "param=modref-max-adjustments" "modref1" } } */
+/* { dg-final { scan-tree-dump-not "--param modref-max-accesses" "modref1" } } */
+/* { dg-final { scan-tree-dump "--param modref-max-adjustments" "modref1" } } */
  /* In set all accesses should merge together.  */
  /* { dg-final { scan-tree-dump "access: Parm 0 param offset:0 offset:0 size:8 max_size:40" "modref1" } } */
  /* In recurse we should cap the recrusion after 8 attempts and set max_size to -1.  */