public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v3)] Add more comments. Date: Mon, 29 Nov 2021 11:13:49 +0000 (GMT) [thread overview] Message-ID: <20211129111349.85C61386F437@sourceware.org> (raw) https://gcc.gnu.org/g:277832038c353f154ba7bc670f6e6d0751102b51 commit 277832038c353f154ba7bc670f6e6d0751102b51 Author: Martin Liska <mliska@suse.cz> Date: Mon Nov 29 12:04:28 2021 +0100 Add more comments. Diff: --- gcc/tree-ssa-loop-unswitch.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index a41c25784f3..aa9f25e1907 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -285,11 +285,9 @@ is_maybe_undefined (const tree name, gimple *stmt, class loop *loop) return false; } -// FIXME /* Checks whether we can unswitch LOOP on condition at end of BB -- one of its basic blocks (for what it means see comments below). - RANGER is gimple ranger used in this pass and unswitch_predicate is returned - if there is an opportunity for unswitching. */ + All candidates all filled to the provided vector CANDIDATES. */ static void find_unswitching_predicates_for_bb (basic_block bb, class loop *loop, @@ -409,10 +407,8 @@ evaluate_control_stmt_using_entry_checks (gimple *stmt, return NULL_TREE; } -/* Find all unswitching predicates for a LOOP that contains BBS. - TRUE_EDGE distinguish which PARENT_PREDICATE should be used when - asking RANGER infrastructure. Return unswitch_predicate in the provided - CANDIDATES vector. */ +/* Simplify LOOP based on PREDICATE_PATH where dead edges are properly + marked. */ static bool simplify_loop_version (class loop *loop, predicate_vector &predicate_path) @@ -450,12 +446,11 @@ simplify_loop_version (class loop *loop, predicate_vector &predicate_path) } /* Evaluate how many instructions will be executed if we unswitch - LOOP (with BBS) based on PREDICATE. TRUE_EDGE distinguishes if - we calculate taken or not taken edge when asking RANGER. + LOOP (with BBS) based on PREDICATE_PATH. REACHABLE_FLAG is used for marking of the basic blocks. */ static unsigned -evaluate_insns (class loop *loop, basic_block *bbs, +evaluate_insns (class loop *loop, basic_block *bbs, predicate_vector &predicate_path, auto_bb_flag &reachable_flag) { @@ -528,7 +523,7 @@ evaluate_insns (class loop *loop, basic_block *bbs, } /* Evaluate how many instruction will we have if we unswitch LOOP (with BBS) - based on CANDIDATE predicate (using RANGER infrastructure). */ + based on PREDICATE predicate (using PREDICATE_PATH). */ static unsigned evaluate_loop_insns_for_predicate (class loop *loop, basic_block *bbs, @@ -552,7 +547,8 @@ evaluate_loop_insns_for_predicate (class loop *loop, basic_block *bbs, /* Unswitch single LOOP. NUM is number of unswitchings done; we do not allow it to grow too much, it is too easy to create example on that the code would - grow exponentially. RANGER is gimple ranger used in this pass. */ + grow exponentially. PREDICATE_PATH contains so far used predicates + for unswitching. */ static bool tree_unswitch_single_loop (class loop *loop, int num,
reply other threads:[~2021-11-29 11:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211129111349.85C61386F437@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).