This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[GSoC][match-and-simplify] Remove gen_gimple_match_fail
- From: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Diego Novillo <dnovillo at google dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>
- Date: Mon, 23 Jun 2014 19:13:41 +0530
- Subject: [GSoC][match-and-simplify] Remove gen_gimple_match_fail
- Authentication-results: sourceware.org; auth=none
* genmatch.c (gen_gimple_match_fail): Remove.
(expr::gen_gimple_transform): Remove call to gen_gimple_match_fail.
Change fprintf (f, "if (!res)") to fprintf (f, "if (!res) return false;\n")
Thanks and Regards,
Prathamesh
Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c (revision 211893)
+++ gcc/genmatch.c (working copy)
@@ -452,15 +452,6 @@ commutate (operand *op)
/* Code gen off the AST. */
-static void
-gen_gimple_match_fail (FILE *f, const char *label)
-{
- if (!label)
- fprintf (f, "return NULL_TREE;\n");
- else
- fprintf (f, "goto %s;\n", label);
-}
-
void
expr::gen_gimple_transform (FILE *f, const char *label, const char *dest)
{
@@ -481,8 +472,7 @@ expr::gen_gimple_transform (FILE *f, con
for (unsigned i = 0; i < ops.length (); ++i)
fprintf (f, ", ops[%u]", i);
fprintf (f, ", seq, valueize);\n");
- fprintf (f, " if (!res) ");
- gen_gimple_match_fail (f, label);
+ fprintf (f, " if (!res) return false;\n");
fprintf (f, " }\n");
fprintf (f, " else\n");
fprintf (f, " res = gimple_build (seq, UNKNOWN_LOCATION, %s, "