public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: GCC patches <gcc-patches@gcc.gnu.org>
Cc: Andrew MacLeod <amacleod@redhat.com>, Aldy Hernandez <aldyh@redhat.com>
Subject: [COMMITTED] Do not export global ranges from -Walloca pass.
Date: Mon, 17 Apr 2023 20:47:01 +0200	[thread overview]
Message-ID: <20230417184701.217397-1-aldyh@redhat.com> (raw)

A warning pass should not be exporting global ranges it finds along
the way, because that will alter the behavior of future passes.

The reason the present behavior was there was because of some long ago
forgotten regression in another pass.  This regression is no longer
there, and if there's ever any fallout from cleaning this up, we can
address it in the pass that is missing some information.

This pass hardly changes, so it should be ok to commit now.

gcc/ChangeLog:

	* gimple-ssa-warn-alloca.cc (pass_walloca::execute): Do not export
	global ranges.
---
 gcc/gimple-ssa-warn-alloca.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/gimple-ssa-warn-alloca.cc b/gcc/gimple-ssa-warn-alloca.cc
index 5b220a5c68e..4374f572cd9 100644
--- a/gcc/gimple-ssa-warn-alloca.cc
+++ b/gcc/gimple-ssa-warn-alloca.cc
@@ -256,7 +256,7 @@ in_loop_p (gimple *stmt)
 unsigned int
 pass_walloca::execute (function *fun)
 {
-  gimple_ranger *ranger = enable_ranger (fun);
+  enable_ranger (fun);
   basic_block bb;
   FOR_EACH_BB_FN (bb, fun)
     {
@@ -379,7 +379,6 @@ pass_walloca::execute (function *fun)
 	    }
 	}
     }
-  ranger->export_global_ranges ();
   disable_ranger (fun);
   return 0;
 }
-- 
2.39.2


                 reply	other threads:[~2023-04-17 18:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230417184701.217397-1-aldyh@redhat.com \
    --to=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).