aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-09-04 20:56:16 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-09-04 20:56:16 +0000
commitb28e4e44278bfe2872cc8ca9b4dc623c5df6523d (patch)
treeb344b2b4637503dc3ad9653c7e57435543542096
parent8e3177d9a6d6b6a24027aa2d2d0c4cf410d77f08 (diff)
downloadgcc-b28e4e44278bfe2872cc8ca9b4dc623c5df6523d.zip
gcc-b28e4e44278bfe2872cc8ca9b4dc623c5df6523d.tar.gz
gcc-b28e4e44278bfe2872cc8ca9b4dc623c5df6523d.tar.bz2
insn_latency takes a pair of rtx_insn
gcc/ 2014-09-04 David Malcolm <dmalcolm@redhat.com> * 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
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/genattr.c2
-rw-r--r--gcc/genautomata.c8
3 files changed, 11 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e65a69f..a4d5793 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2014-09-04 David Malcolm <dmalcolm@redhat.com>
+ * 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 <dmalcolm@redhat.com>
+
* jump.c (eh_returnjump_p): Strengthen param "insn" from rtx to
rtx_insn *.
diff --git a/gcc/genattr.c b/gcc/genattr.c
index 5845dbb..b7e2a92 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 a4501e9..8cf81b0 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 <rtx_insn *> (uncast_%s);\n",
- INSN_PARAMETER_NAME, INSN_PARAMETER_NAME);
- fprintf (output_file,
- " rtx_insn *%s = safe_as_a <rtx_insn *> (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,