From 9da3143a3710388809cec3b2b2d959a44872ea60 Mon Sep 17 00:00:00 2001 From: segher Date: Wed, 2 Jul 2014 20:19:19 +0000 Subject: Only transform rotate to rotatert and v.v. if target has both Many targets do not have both rotate and rotatert. Of the 47 targets in the tree, 17 have both, 9 have only rotate, 2 have only rotatert, and 19 have neither (this is based on "grep -wil" so it can be slightly off). rs6000 has only rotate, and mips has only rotatert. For such targets simplifying rotate to rotatert and vice versa is not simplifying things at all. rs6000 has already way too many rotate patterns (some days it seems like two thousand, but it is somewhat less in reality still); I would prefer not to double that again. So, this patch makes genrecog define HAVE_rotate and HAVE_rotatert if those RTL codes are mentioned anywhere in the machine description, and then does the transformation in simplify-rtx.c only if both these flags are set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212239 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/genconfig.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gcc/genconfig.c') diff --git a/gcc/genconfig.c b/gcc/genconfig.c index cafa8d3040a..d1996c3af5d 100644 --- a/gcc/genconfig.c +++ b/gcc/genconfig.c @@ -36,6 +36,8 @@ static int have_cc0_flag; static int have_cmove_flag; static int have_cond_exec_flag; static int have_lo_sum_flag; +static int have_rotate_flag; +static int have_rotatert_flag; static int have_peephole_flag; static int have_peephole2_flag; @@ -117,6 +119,16 @@ walk_insn_part (rtx part, int recog_p, int non_pc_set_src) have_lo_sum_flag = 1; return; + case ROTATE: + if (recog_p) + have_rotate_flag = 1; + return; + + case ROTATERT: + if (recog_p) + have_rotatert_flag = 1; + return; + case SET: walk_insn_part (SET_DEST (part), 0, recog_p); walk_insn_part (SET_SRC (part), recog_p, @@ -346,6 +358,12 @@ main (int argc, char **argv) if (have_lo_sum_flag) printf ("#define HAVE_lo_sum 1\n"); + if (have_rotate_flag) + printf ("#define HAVE_rotate 1\n"); + + if (have_rotatert_flag) + printf ("#define HAVE_rotatert 1\n"); + if (have_peephole_flag) printf ("#define HAVE_peephole 1\n"); -- cgit v1.2.1