From: Andre Vieira <andre.simoesdiasvie...@arm.com> Somewhat following richi's example of SLP cleanup, this patch series cleansup SLP code for vectorizable_reduction and friends.
1) fold trivially true/false conditions based on the slp_node argument without code block removal/reindent, etc. 2) do trivial dead code elimination 3) first steps in cleanup simple things - it's expected that the 'ncopies' variable vanishes (a vec_num one might remain), removed 'get_initial_def_for_reduction'. Not entirely sure what to do about STMT_VINFO_VECTYPE. 4) folds loops that used ncopies and now no longer need to be loops 5) When trying to do 3, I could not remove the use of 'vec_stmt' for vectorizable_lc_phi as that was needed to distinguish between 'analysis' and 'transformation', so in this step we split up vectorizable_lc_phi and create a vect_transform_lc_phi, similar to other vectorizable_* and vect_transform_*. 6) Remove the gimple ** argument that is no longer needed from vectorizable_lc_phi and vect_transform_lc_phi The order of 5-6 relative to the rest could be changed, but I only noticed its need after, happy to re-order and whether there are any objections to these all being squashed together, there may be an argument for doing 5-6 as a separate squashed patch. I tested a version of these on x86_64-pc-linux-gnu, aarch64-none-linux-gnu and arm-none-gnueabihf but made some minor changes since. I'll retest after discussing some further changes around the STMT_VINFO_VECTYPE stuff. Andre Vieira (6): vect: Remove non-SLP path from vectorizable_reduction vect: Remove non-SLP path from vectorizable_reduction vect: Remove non-SLP path from vectorizable_reduction vect: Remove non-SLP path from vectorizable_reduction vect: Split vectorizable_lc_phi vect: Split vectorizable_lc_phi gcc/tree-vect-loop.cc | 728 ++++++++++++----------------------------- gcc/tree-vect-stmts.cc | 10 +- gcc/tree-vectorizer.h | 7 +- 3 files changed, 209 insertions(+), 536 deletions(-) -- 2.34.1