This was meant to be an internal construct, but I see folks are using
it and submitting PRs against it.  Let's just remove this to avoid
further confusion.

Tested on x86-64 Linux.

Pushed to keep PRs down and Jeff happy :).

gcc/ChangeLog:

        PR tree-optimization/101724
        * params.opt: Remove --param=threader-iterative.
        * tree-ssa-threadbackward.c (pass_thread_jumps::execute): Remove
        iterative mode.
---
 gcc/params.opt                |  4 ----
 gcc/tree-ssa-threadbackward.c | 18 ++----------------
 2 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/gcc/params.opt b/gcc/params.opt
index f1f47b44215..aa2fb4047b6 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1010,10 +1010,6 @@ Maximum depth of DFS walk used by modref escape analysis.
 Common Joined UInteger Var(param_modref_max_escape_points) Init(256) Param 
Optimization
 Maximum number of escape points tracked by modref per SSA-name.
 
--param=threader-iterative=
-Common Joined UInteger Var(param_threader_iterative) Init(0) Param Optimization
-Run backwards threader in iterative mode.
-
 -param=threader-mode=
 Common Joined Var(param_threader_mode) Enum(threader_mode) 
Init(THREADER_MODE_RANGER) Param Optimization
 --param=threader-mode=[legacy|ranger] Specifies the mode the backwards 
threader should run in.
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c
index 2c0e9751101..91ce443b1b2 100644
--- a/gcc/tree-ssa-threadbackward.c
+++ b/gcc/tree-ssa-threadbackward.c
@@ -1342,24 +1342,10 @@ pass_thread_jumps::execute (function *fun)
 {
   loop_optimizer_init (LOOPS_HAVE_PREHEADERS | LOOPS_HAVE_SIMPLE_LATCHES);
 
-  // Iterative mode is a testing construct and is not meant for public
-  // consumption.  It is OFF by default.
-  bool iterative = param_threader_iterative;
-
-  bool changed = false;
-  while (try_thread_blocks (fun))
-    {
-      changed = true;
-
-      if (!iterative)
-       break;
-
-      if ((param_threader_mode & THREADER_MODE_RANGER) == 0)
-       break;
-      cleanup_tree_cfg (TODO_update_ssa);
-    }
+  bool changed = try_thread_blocks (fun);
 
   loop_optimizer_finalize ();
+
   return changed ? TODO_cleanup_cfg : 0;
 }
 
-- 
2.31.1

Reply via email to