aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2023-10-18 09:02:40 +0100
committerTamar Christina <tamar.christina@arm.com>2023-10-18 09:02:40 +0100
commit0c8522870effb87f9ea0f0f5897d5b0084c32b50 (patch)
treeefa9fd4b50ecdcb2fa417100e8e9a04929ea3cfa /libgcc
parentd65e38e616e7ac8157ef04b55beb6670f2c0f142 (diff)
downloadgcc-0c8522870effb87f9ea0f0f5897d5b0084c32b50.zip
gcc-0c8522870effb87f9ea0f0f5897d5b0084c32b50.tar.gz
gcc-0c8522870effb87f9ea0f0f5897d5b0084c32b50.tar.bz2
middle-end: updated niters analysis to handle multiple exits.
This second part updates niters analysis to be able to analyze any number of exits. If we have multiple exits we determine the main exit by finding the first counting IV. The change allows the vectorizer to pass analysis for multiple loops, but we later gracefully reject them. It does however allow us to test if the exit handling is using the right exit everywhere. Additionally since we analyze all exits, we now return all conditions for them and determine which condition belongs to the main exit. The main condition is needed because the vectorizer needs to ignore the main IV condition during vectorization as it will replace it during codegen. To track versioned loops we extend the contract between ifcvt and the vectorizer to store the exit number in aux so that we can match it up again during peeling. gcc/ChangeLog: * tree-if-conv.cc (tree_if_conversion): Record exits in aux. * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg): Use it. * tree-vect-loop.cc (vect_get_loop_niters): Determine main exit. (vec_init_loop_exit_info): Extend analysis when multiple exits. (vect_analyze_loop_form): Record conds and determine main cond. (vect_create_loop_vinfo): Extend bookkeeping of conds. (vect_analyze_loop): Release conds. * tree-vectorizer.h (LOOP_VINFO_LOOP_CONDS, LOOP_VINFO_LOOP_IV_COND): New. (struct vect_loop_form_info): Add conds, alt_loop_conds; (struct loop_vec_info): Add conds, loop_iv_cond.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions