diff mbox

[210/236] varasm.c: Use rtx_sequence

Message ID 1407345815-14551-211-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Aug. 6, 2014, 5:23 p.m. UTC
gcc/
	* varasm.c (mark_constants): Convert a GET_CODE check into a
	dyn_cast, strengthening local "seq" from rtx to rtx_sequence *.
	Use methods of rtx_sequence to clarify the code.
---
 gcc/varasm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/gcc/varasm.c b/gcc/varasm.c
index 8c65c1c..2b05915 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -3957,13 +3957,12 @@  mark_constants (rtx_insn *insn)
   /* Insns may appear inside a SEQUENCE.  Only check the patterns of
      insns, not any notes that may be attached.  We don't want to mark
      a constant just because it happens to appear in a REG_EQUIV note.  */
-  if (GET_CODE (PATTERN (insn)) == SEQUENCE)
+  if (rtx_sequence *seq = dyn_cast <rtx_sequence *> (PATTERN (insn)))
     {
-      rtx seq = PATTERN (insn);
-      int i, n = XVECLEN (seq, 0);
+      int i, n = seq->len ();
       for (i = 0; i < n; ++i)
 	{
-	  rtx subinsn = XVECEXP (seq, 0, i);
+	  rtx subinsn = seq->element (i);
 	  if (INSN_P (subinsn))
 	    for_each_rtx (&PATTERN (subinsn), mark_constant, NULL);
 	}