From: David Malcolm Date: Thu, 4 Sep 2014 20:56:16 +0000 (+0000) Subject: insn_latency takes a pair of rtx_insn X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b28e4e44278bfe2872cc8ca9b4dc623c5df6523d;p=gcc.git insn_latency takes a pair of rtx_insn gcc/ 2014-09-04 David Malcolm * genattr.c (main): Within the prototype of insn_latency written out to insn-attr.h, strengthen both params from rtx to rtx_insn *. * genautomata.c (output_internal_maximal_insn_latency_func): Within the implementation of insn_latency written out to insn-automata.c, strengthen both params from rtx to rtx_insn *, eliminating a pair of checked casts. From-SVN: r214921 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e65a69faa00..a4d5793b635 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2014-09-04 David Malcolm + + * genattr.c (main): Within the prototype of insn_latency written + out to insn-attr.h, strengthen both params from rtx to rtx_insn *. + * genautomata.c (output_internal_maximal_insn_latency_func): + Within the implementation of insn_latency written out to + insn-automata.c, strengthen both params from rtx to rtx_insn *, + eliminating a pair of checked casts. + 2014-09-04 David Malcolm * jump.c (eh_returnjump_p): Strengthen param "insn" from rtx to diff --git a/gcc/genattr.c b/gcc/genattr.c index 5845dbb704b..b7e2a921627 100644 --- a/gcc/genattr.c +++ b/gcc/genattr.c @@ -248,7 +248,7 @@ main (int argc, char **argv) printf ("/* Insn latency time on data consumed by the 2nd insn.\n"); printf (" Use the function if bypass_p returns nonzero for\n"); printf (" the 1st insn. */\n"); - printf ("extern int insn_latency (rtx, rtx);\n\n"); + printf ("extern int insn_latency (rtx_insn *, rtx_insn *);\n\n"); printf ("/* Maximal insn latency time possible of all bypasses for this insn.\n"); printf (" Use the function if bypass_p returns nonzero for\n"); printf (" the 1st insn. */\n"); diff --git a/gcc/genautomata.c b/gcc/genautomata.c index a4501e94a66..8cf81b054fe 100644 --- a/gcc/genautomata.c +++ b/gcc/genautomata.c @@ -8477,16 +8477,10 @@ output_internal_maximal_insn_latency_func (void) static void output_insn_latency_func (void) { - fprintf (output_file, "int\n%s (rtx uncast_%s, rtx uncast_%s)\n", + fprintf (output_file, "int\n%s (rtx_insn *%s, rtx_insn *%s)\n", INSN_LATENCY_FUNC_NAME, INSN_PARAMETER_NAME, INSN2_PARAMETER_NAME); fprintf (output_file, "{\n int %s, %s;\n", INTERNAL_INSN_CODE_NAME, INTERNAL_INSN2_CODE_NAME); - fprintf (output_file, - " rtx_insn *%s = safe_as_a (uncast_%s);\n", - INSN_PARAMETER_NAME, INSN_PARAMETER_NAME); - fprintf (output_file, - " rtx_insn *%s = safe_as_a (uncast_%s);\n", - INSN2_PARAMETER_NAME, INSN2_PARAMETER_NAME); output_internal_insn_code_evaluation (INSN_PARAMETER_NAME, INTERNAL_INSN_CODE_NAME, 0); output_internal_insn_code_evaluation (INSN2_PARAMETER_NAME,