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 >