diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2021-10-15 14:46:32 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2021-10-17 18:51:39 +0200 |
commit | 5d4d64faa71a6389bfb76bfb3334b63360cf62c0 (patch) | |
tree | c3eeb954ccd2460268b3fbdd4747bfc977c035b9 /libcc1 | |
parent | 7319539d32b9c930f040350fc4d9c327cdf2dc0f (diff) | |
download | gcc-5d4d64faa71a6389bfb76bfb3334b63360cf62c0.zip gcc-5d4d64faa71a6389bfb76bfb3334b63360cf62c0.tar.gz gcc-5d4d64faa71a6389bfb76bfb3334b63360cf62c0.tar.bz2 |
Allow fully resolving backward jump threading passes.
This refactors the backward threader pass so that it can be called in
either fully resolving mode, or in classic mode where any unknowns
default to VARYING. Doing so opens the door for
"pass_thread_jumps_full" which has the resolving bits set.
This pass has not been added to the pipeline, but with it in place, we
can now experiment with it to see how to reduce the number of
jump threaders. The first suspect will probably be enabling fully
resolving in the backward threader pass immediately preceeding VRP2,
and removing the VRP2 threader pass. Now that VRP and the backward
threader are sharing a solver, and most of the threads get handcuffed
by cancel_threads(), we should have a variety of scenarios to try.
In the process, I have cleaned up things to make it trivial to see
what the difference between the 3 variants are (early jump
threading, quick jump threading without resolving SSAs, and fully
resolving jump threading). Since I moved stuff around, it's probably
easier to just look at the last section in tree-ssa-threadbackward to
see how it's all laid out.
No functional changes as the new pass hasn't been added to the
pipeline.
gcc/ChangeLog:
* tree-pass.h (make_pass_thread_jumps_full): New.
* tree-ssa-threadbackward.c (pass_thread_jumps::gate): Inline.
(try_thread_blocks): Add resolve and speed arguments.
(pass_thread_jumps::execute): Inline.
(do_early_thread_jumps): New.
(do_thread_jumps): New.
(make_pass_thread_jumps): Move.
(pass_early_thread_jumps::gate): Inline.
(pass_early_thread_jumps::execute): Inline.
(class pass_thread_jumps_full): New.
Diffstat (limited to 'libcc1')
0 files changed, 0 insertions, 0 deletions