aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/linear-2.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-08-15 15:38:09 +0200
committerRichard Biener <rguenther@suse.de>2022-08-17 10:40:43 +0200
commitbac07a1da24fbc40720bd4080caaea6fa7769672 (patch)
treef257b97ac867dafcd95d8c0b84843a7035c6b7ae /libgomp/testsuite/libgomp.c/linear-2.c
parent5bc2042df437cd8aeebcdf5bbb858678e3733ca4 (diff)
downloadgcc-bac07a1da24fbc40720bd4080caaea6fa7769672.zip
gcc-bac07a1da24fbc40720bd4080caaea6fa7769672.tar.gz
gcc-bac07a1da24fbc40720bd4080caaea6fa7769672.tar.bz2
Refactor back_threader_profitability
The following refactors profitable_path_p in the backward threader, splitting out parts that can be computed once the exit block is known, parts that contiguously update and that can be checked allowing for the path to be later identified as FSM with larger limits, possibly_profitable_path_p, and final checks done when the whole path is known, profitable_path_p. I've removed the back_threader_profitability instance from the back_threader class and instead instantiate it once per path discovery. I've kept the size compute non-incremental to simplify the patch and not worry about unwinding. There's key changes to previous behavior - namely we apply the param_max_jump_thread_duplication_stmts early only when we know the path cannot become an FSM one (multiway + thread through latch) but make sure to elide the path query when we we didn't yet discover that but are over this limit. Similarly the speed limit is now used even when we did not yet discover a hot BB on the path. Basically the idea is to only stop path discovery when we know the path will never become profitable but avoid the expensive path range query when we know it's currently not. I've done a few cleanups, merging functions, on the way. * tree-ssa-threadbackward.cc (back_threader_profitability): Split profitable_path_p into possibly_profitable_path_p and itself, keep state as new members. (back_threader::m_profit): Remove. (back_threader::find_paths): Likewise. (back_threader::maybe_register_path): Take profitability instance as parameter. (back_threader::find_paths_to_names): Likewise. Use possibly_profitable_path_p and avoid the path range query when the path is currently too large. (back_threader::find_paths): Fold into ... (back_threader::maybe_thread_block): ... this. (get_gimple_control_stmt): Remove. (back_threader_profitability::possibly_profitable_path_p): Split out from profitable_path_p, do early profitability checks. (back_threader_profitability::profitable_path_p): Do final profitability path after the taken edge has been determined.
Diffstat (limited to 'libgomp/testsuite/libgomp.c/linear-2.c')
0 files changed, 0 insertions, 0 deletions