From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH][PUSHED] Remove unused function.
Date: Fri, 12 Nov 2021 12:39:13 +0100 [thread overview]
Message-ID: <0513856b-6dcb-0a75-eef0-c2c83fac9865@suse.cz> (raw)
This one is last unused function we have, I'm going to push
this as obvious. Martin, feel free to restore the function once
it's used.
Thanks,
Martin
PR tree-optimization/102497
gcc/ChangeLog:
* gimple-predicate-analysis.cc (add_pred): Remove unused
function:
---
gcc/gimple-predicate-analysis.cc | 61 --------------------------------
1 file changed, 61 deletions(-)
diff --git a/gcc/gimple-predicate-analysis.cc b/gcc/gimple-predicate-analysis.cc
index 454113d532e..6dde0203841 100644
--- a/gcc/gimple-predicate-analysis.cc
+++ b/gcc/gimple-predicate-analysis.cc
@@ -2105,67 +2105,6 @@ predicate::normalize (gimple *use_or_def, bool is_use)
}
}
-/* Add a predicate for the condition or logical assignment STMT to CHAIN.
- Expand SSA_NAME into constituent subexpressions. Invert the result
- if INVERT is true. Return true if the predicate has been added. */
-
-static bool
-add_pred (pred_chain *chain, gimple *stmt, bool invert)
-{
- if (gimple_code (stmt) == GIMPLE_COND)
- {
- tree lhs = gimple_cond_lhs (stmt);
- if (TREE_CODE (lhs) == SSA_NAME)
- {
- gimple *def = SSA_NAME_DEF_STMT (lhs);
- if (is_gimple_assign (def)
- && add_pred (chain, def, invert))
- return true;
- }
-
- pred_info pred;
- pred.pred_lhs = lhs;
- pred.pred_rhs = gimple_cond_rhs (stmt);
- pred.cond_code = gimple_cond_code (stmt);
- pred.invert = invert;
- chain->safe_push (pred);
- return true;
- }
-
- if (!is_gimple_assign (stmt))
- return false;
-
- if (gimple_assign_single_p (stmt))
- // FIXME: handle this?
- return false;
-
- if (TREE_TYPE (gimple_assign_lhs (stmt)) != boolean_type_node)
- return false;
-
- tree rhs1 = gimple_assign_rhs1 (stmt);
- tree rhs2 = gimple_assign_rhs2 (stmt);
- tree_code code = gimple_assign_rhs_code (stmt);
- if (code == BIT_AND_EXPR)
- {
- if (TREE_CODE (rhs1) == SSA_NAME
- && add_pred (chain, SSA_NAME_DEF_STMT (rhs1), invert)
- && TREE_CODE (rhs2) == SSA_NAME
- /* FIXME: Need to handle failure below! */
- && add_pred (chain, SSA_NAME_DEF_STMT (rhs2), invert))
- return true;
- }
- else if (TREE_CODE_CLASS (code) != tcc_comparison)
- return false;
-
- pred_info pred;
- pred.pred_lhs = rhs1;
- pred.pred_rhs = rhs2;
- pred.cond_code = code;
- pred.invert = invert;
- chain->safe_push (pred);
- return true;
-}
-
/* Convert the chains of control dependence edges into a set of predicates.
A control dependence chain is represented by a vector edges. DEP_CHAINS
points to an array of NUM_CHAINS dependence chains. One edge in
--
2.33.1
next reply other threads:[~2021-11-12 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 11:39 Martin Liška [this message]
2022-08-31 12:34 [PATCH (pushed)] remove " Martin Liška
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=0513856b-6dcb-0a75-eef0-c2c83fac9865@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@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: link
Be 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).