public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v3)] Add more comments.
@ 2021-11-29 11:13 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-11-29 11:13 UTC (permalink / raw)
To: gcc-cvs
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,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-29 11:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 11:13 [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v3)] Add more comments Martin Liska
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).