public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] remove an unneeded as_a<rtx_insn *> ()
@ 2015-10-10 14:31 tbsaunde+gcc
  0 siblings, 0 replies; only message in thread
From: tbsaunde+gcc @ 2015-10-10 14:31 UTC (permalink / raw)
  To: gcc-patches

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

Hi,

obvious clean up, bootstrapped + regtested x86_64-linux-gnu, committed.

Trev

gcc/ChangeLog:

2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* function.c (stack_protect_epilogue): Remove as_a<rtx_insn *> ()
	call that isn't needed.
---
 gcc/ChangeLog  | 5 +++++
 gcc/function.c | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 81f6ad8..6066ce8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-10  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
+	* function.c (stack_protect_epilogue): Remove as_a<rtx_insn *> ()
+	call that isn't needed.
+
 2015-10-09  Martin Jambor  <mjambor@suse.cz>
 
 	tree-optimization/67794
diff --git a/gcc/function.c b/gcc/function.c
index d16d6d8..db5bc1c 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4986,7 +4986,7 @@ stack_protect_epilogue (void)
 {
   tree guard_decl = targetm.stack_protect_guard ();
   rtx_code_label *label = gen_label_rtx ();
-  rtx x, y, tmp;
+  rtx x, y;
   rtx_insn *seq;
 
   x = expand_normal (crtl->stack_protect_guard);
@@ -5005,9 +5005,9 @@ stack_protect_epilogue (void)
      things moved out of line.  Since this is the only extant case of adding
      a noreturn function at the rtl level, it doesn't seem worth doing ought
      except adding the prediction by hand.  */
-  tmp = get_last_insn ();
+  rtx_insn *tmp = get_last_insn ();
   if (JUMP_P (tmp))
-    predict_insn_def (as_a <rtx_insn *> (tmp), PRED_NORETURN, TAKEN);
+    predict_insn_def (tmp, PRED_NORETURN, TAKEN);
 
   expand_call (targetm.stack_protect_fail (), NULL_RTX, /*ignore=*/true);
   free_temp_slots ();
-- 
2.6.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-10 14:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-10 14:31 [PATCH] remove an unneeded as_a<rtx_insn *> () tbsaunde+gcc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).