aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppdefault.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2021-11-10 11:13:09 +0100
committerAldy Hernandez <aldyh@redhat.com>2021-11-10 17:45:01 +0100
commitb0c83d59f44bf677c8d74acae228acf32719acb3 (patch)
treeba62e54ec581868f3d16113a1a4ceddf5dd5230b /gcc/cppdefault.c
parent86ffc845b2d0bff59832dcf3cf6518f1358e30ac (diff)
downloadgcc-b0c83d59f44bf677c8d74acae228acf32719acb3.zip
gcc-b0c83d59f44bf677c8d74acae228acf32719acb3.tar.gz
gcc-b0c83d59f44bf677c8d74acae228acf32719acb3.tar.bz2
path solver: Adjustments for use outside of the backward threader.
Here are some enhancements to make it easier for other clients to use the path solver. First, I've made the imports to the solver optional since we can calculate them ourselves. However, I've left the ability to set them, since the backward threader adds a few SSA names in addition to the default ones. As a follow-up I may move all the import set up code from the threader to the solver, as the extra imports tend to improve the behavior slightly. Second, Richi suggested an entry point where you just feed the solver an edge, which will be quite convenient for a subsequent patch adding a client in the header copying pass. The required some shuffling, since we'll be adding the blocks on the fly. There's now a vector copy, but the impact will be minimal, since these are just 5-6 entries at the most. Tested on ppc64le Linux. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::path_range_query): Do not init m_path. (path_range_query::dump): Change m_path uses to non-pointer. (path_range_query::defined_outside_path): Same. (path_range_query::set_path): Same. (path_range_query::add_copies_to_imports): Same. (path_range_query::range_of_stmt): Same. (path_range_query::compute_outgoing_relations): Same. (path_range_query::compute_ranges): Imports are now optional. Implement overload that takes an edge. * gimple-range-path.h (class path_range_query): Make imports optional for compute_ranges. Add compute_ranges(edge) overload. Make m_path an auto_vec instead of a pointer and adjust accordingly.
Diffstat (limited to 'gcc/cppdefault.c')
0 files changed, 0 insertions, 0 deletions