]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not export global ranges from -Walloca pass.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 17 Apr 2023 15:05:38 +0000 (17:05 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Mon, 17 Apr 2023 18:47:20 +0000 (20:47 +0200)
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.

gcc/ChangeLog:

* gimple-ssa-warn-alloca.cc (pass_walloca::execute): Do not export
global ranges.

gcc/gimple-ssa-warn-alloca.cc

index 5b220a5c68e2a9e5aa4557317d78f9b85c709f9d..4374f572cd9c9fc67aa4052e5a936d7da7fa0da2 100644 (file)
@@ -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;
 }