aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2021-11-11 11:57:26 +0100
committerAldy Hernandez <aldyh@redhat.com>2021-11-11 15:42:00 +0100
commitbfa04d0ec958ebff38ea9d2340a3f4f8e4c04a2d (patch)
tree39bfee50b549cc94b5df41139295f8ea4a420455 /gcc/gimplify.c
parent1ea781a8657cdbecffa14b5bce960738087e58f3 (diff)
downloadgcc-bfa04d0ec958ebff38ea9d2340a3f4f8e4c04a2d.zip
gcc-bfa04d0ec958ebff38ea9d2340a3f4f8e4c04a2d.tar.gz
gcc-bfa04d0ec958ebff38ea9d2340a3f4f8e4c04a2d.tar.bz2
Move import population from threader to path solver.
Imports are our nomenclature for external SSA names to a block that are used to calculate the outgoing edges for said block. For example, in the following snippet: <bb 2> : _1 = b_10 == block_11; _2 = b_10 != -1; _3 = _1 & _2; if (_3 != 0) goto <bb 3>; [INV] else goto <bb 5>; [INV] ...the imports to the block are b_10 and block_11 since they are both needed to calculate _3. The path solver takes a bitmap of imports in addition to the path itself. This sets up the number of SSA names to be on the lookout for, while resolving the final conditional. Calculating these imports was initially done in the threader, since it was the only user of the path solver. With new clients, it has become obvious that populating the imports should be a task for the path solver, so it can be shared among the clients. This patch moves the import code to the solver, making both the solver and the threader simpler in the process. This is because intent is clearer and some duplicate code was removed. This reshuffling had the net effect of giving us a handful of new threads through my suite of .ii files (125). This was unexpected, but welcome nevertheless. There is no performance difference in callgrind over the same suite. Regstrapped on x86-64 Linux. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::add_copies_to_imports): Rename to... (path_range_query::compute_imports): ...this. Adapt it so it can be passed the imports bitmap instead of working on m_imports. (path_range_query::compute_ranges): Call compute_imports in all cases unless an imports bitmap is passed. * gimple-range-path.h (path_range_query::compute_imports): New. (path_range_query::add_copies_to_imports): Remove. * tree-ssa-threadbackward.c (back_threader::resolve_def): Remove. (back_threader::find_paths_to_names): Inline resolve_def. (back_threader::find_paths): Call compute_imports. (back_threader::resolve_phi): Adjust comment.
Diffstat (limited to 'gcc/gimplify.c')
0 files changed, 0 insertions, 0 deletions