From d8a4ce12d6681091b22baa8c0321c20f66213557 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 8 Nov 2019 10:21:43 +0000 Subject: [PATCH] genmatch.c (expr::gen_transform): Use the resimplify member function instead of hard-coding the... 2019-11-08 Richard Biener * genmatch.c (expr::gen_transform): Use the resimplify member function instead of hard-coding the gimple_resimplifyN variant. (dt_simplify::gen_1): Likewise. From-SVN: r277961 --- gcc/ChangeLog | 6 ++++++ gcc/genmatch.c | 10 +++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d6f516775db..d2dd042b1ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-11-08 Richard Biener + + * genmatch.c (expr::gen_transform): Use the resimplify + member function instead of hard-coding the gimple_resimplifyN variant. + (dt_simplify::gen_1): Likewise. + 2019-11-08 Richard Sandiford * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 7db1f135840..a822ce5ee64 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -2534,12 +2534,9 @@ expr::gen_transform (FILE *f, int indent, const char *dest, bool gimple, for (unsigned i = 0; i < ops.length (); ++i) fprintf (f, ", _o%d[%u]", depth, i); fprintf (f, ");\n"); + fprintf_indent (f, indent, "tem_op.resimplify (lseq, valueize);\n"); fprintf_indent (f, indent, - "gimple_resimplify%d (lseq, &tem_op, valueize);\n", - ops.length ()); - fprintf_indent (f, indent, - "_r%d = maybe_push_res_to_seq (&tem_op, lseq);\n", - depth); + "_r%d = maybe_push_res_to_seq (&tem_op, lseq);\n", depth); fprintf_indent (f, indent, "if (!_r%d) return false;\n", depth); @@ -3413,8 +3410,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) gimple_build w/o actually building the stmt. */ if (!is_predicate) fprintf_indent (f, indent, - "gimple_resimplify%d (lseq, res_op," - " valueize);\n", e->ops.length ()); + "res_op->resimplify (lseq, valueize);\n"); } else if (result->type == operand::OP_CAPTURE || result->type == operand::OP_C_EXPR) -- 2.30.2