Introduce rtx_insn subclass of rtx_def
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 18 Aug 2014 20:02:17 +0000 (20:02 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Mon, 18 Aug 2014 20:02:17 +0000 (20:02 +0000)
commit15f8d3ab4a4f0e893b9080477091425fda92d187
tree405b41edecb80a913b53d51834002c78bfc5aa09
parent26b3538ba2d537d820c45a02c11ae830093410c0
Introduce rtx_insn subclass of rtx_def

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

* coretypes.h (class rtx_insn): Add forward declaration.

* rtl.h: Include is-a.h.
(struct rtx_def): Add dummy "desc" and "tag" GTY options as a
workaround to ensure gengtype knows inheritance is occurring,
whilst continuing to use the pre-existing special-casing for
rtx_def.
(class rtx_insn): New subclass of rtx_def, adding the
invariant that we're dealing with something we can sanely use
INSN_UID, NEXT_INSN, PREV_INSN on.
(is_a_helper <rtx_insn *>::test): New.
(is_a_helper <const rtx_insn *>::test): New.

From-SVN: r214118
gcc/ChangeLog
gcc/coretypes.h
gcc/rtl.h