Commit e0944870 by David Malcolm Committed by David Malcolm

function.c: Use rtx_sequence

gcc/
2014-08-27  David Malcolm  <dmalcolm@redhat.com>

	* function.c (contains): Introduce local "seq" for PATTERN (insn),
	with a checked cast, in the region for where we know it's a
	SEQUENCE.  Use methods of rtx_sequence.

From-SVN: r214595
parent e429a50b
2014-08-27 David Malcolm <dmalcolm@redhat.com> 2014-08-27 David Malcolm <dmalcolm@redhat.com>
* function.c (contains): Introduce local "seq" for PATTERN (insn),
with a checked cast, in the region for where we know it's a
SEQUENCE. Use methods of rtx_sequence.
2014-08-27 David Malcolm <dmalcolm@redhat.com>
* final.c (get_attr_length_1): Replace GET_CODE check with a * final.c (get_attr_length_1): Replace GET_CODE check with a
dyn_cast, introducing local "seq" and the use of methods of dyn_cast, introducing local "seq" and the use of methods of
rtx_sequence. rtx_sequence.
......
...@@ -5335,9 +5335,10 @@ contains (const_rtx insn, htab_t hash) ...@@ -5335,9 +5335,10 @@ contains (const_rtx insn, htab_t hash)
if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
{ {
rtx_sequence *seq = as_a <rtx_sequence *> (PATTERN (insn));
int i; int i;
for (i = XVECLEN (PATTERN (insn), 0) - 1; i >= 0; i--) for (i = seq->len () - 1; i >= 0; i--)
if (htab_find (hash, XVECEXP (PATTERN (insn), 0, i))) if (htab_find (hash, seq->element (i)))
return true; return true;
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment