]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add --param=dom-jump-threading to disable DOM jump threading [PR126103] master trunk
authorAldy Hernandez <aldy@quesejoda.com>
Mon, 10 Aug 2026 06:59:36 +0000 (06:59 +0000)
committerAldy Hernandez <aldy@quesejoda.com>
Mon, 10 Aug 2026 12:31:01 +0000 (14:31 +0200)
commit8a8a022c81b6105f70f72dfe2dc7b368353b49e6
tree74119f71cdc8aa526d008211ada7383ba0374880
parent7bb64f43d406b74205a59a854bd6016c89f1a4e8
Add --param=dom-jump-threading to disable DOM jump threading [PR126103]

As discussed in PR126103, the first step to removing DOM is untangling
its threader from the rest of DOM.  I've started auditing what we're
missing in PRE + backwards threader, and need a way to disable DOM's
threading for the barrage of PRs I'm about to file.

We already have a way to disable all jump threads, but no way to
disable just DOM's.  This patch does jhust this with
--param=dom-jump-threading=[01].  It's in line with what we
temporarily did for ranger-threading and ranger VRP.

The --param disables jump threading in DOM, but everything else DOM
does is unaffected.

Tested on ppc64le Linux.

PR tree-optimization/126103

gcc/ChangeLog:

* doc/params.texi (dom-jump-threading): Document.
* params.opt (-param=dom-jump-threading=): New.
* tree-ssa-dom.cc (dom_opt_dom_walker::after_dom_children): Honor
param_dom_jump_threading.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/dom-jump-threading-1.c: New test.
* gcc.dg/tree-ssa/dom-jump-threading-2.c: New test.
gcc/doc/params.texi
gcc/params.opt
gcc/testsuite/gcc.dg/tree-ssa/dom-jump-threading-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/dom-jump-threading-2.c [new file with mode: 0644]
gcc/tree-ssa-dom.cc