This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 204/236] final.c: Use rtx_sequence


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?

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]