This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 204/236] final.c: Use rtx_sequence
- From: Trevor Saunders <tsaunders at mozilla dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: David Malcolm <dmalcolm at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 15 Aug 2014 18:38:48 -0400
- Subject: Re: [PATCH 204/236] final.c: Use rtx_sequence
- Authentication-results: sourceware.org; auth=none
- References: <1407345815-14551-1-git-send-email-dmalcolm at redhat dot com> <1407345815-14551-205-git-send-email-dmalcolm at redhat dot com> <53EE88B1 dot 3090505 at redhat dot com>
On Fri, Aug 15, 2014 at 04:24:49PM -0600, Jeff Law wrote:
> On 08/06/14 11:23, David Malcolm wrote:
> >gcc/
> > * final.c (get_attr_length_1): Replace GET_CODE check with a
> > dyn_cast, introducing local "seq" and the use of methods of
> > rtx_sequence.
> > (shorten_branches): Likewise, introducing local "body_seq".
> > Strengthen local "inner_insn" from rtx to rtx_insn *.
> > (reemit_insn_block_notes): Replace GET_CODE check with a
> > dyn_cast, strengthening local "body" from rtx to rtx_sequence *.
> > Use methods of rtx_sequence.
> > (final_scan_insn): Likewise, introducing local "seq" for when
> > "body" is known to be a SEQUENCE, using its methods.
> So presumably a dyn_cast isn't terribly expensive here? I guess I'm a bit
> fuzzy on whether or not we agreed to allow using dynamic casts?!? Doesn't
> that have to check the RTTI info which I would think would be considerably
> more expensive than just checking the code. Or am I missing something here?
your missing dyn_cast != dynamic_cast, the first is just a wrapper
around as_a / is_a, and so doesn't use rtti.
Trev
>
> Jeff
>