This is the mail archive of the gcc@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: generate RTL sequence


daniel tian <daniel.xntian@gmail.com> writes:

>  By the way, I don't underand the start_sequence and end_sequence.
>  What does those function mean.
>   I checked the source code in emit-rtl.c.
>   I still can't figure out what they do.
>  There is a structure sequence_stack, I don't what it does.

start_sequence and end_sequence are used to group insns into a
specific location when you are generating insns.  I quote the comment
in emit-rtl.c:

   For example, consider the instruction named SPOT and the fact that
   we would like to emit some instructions before SPOT.  We might do
   it like this:

	start_sequence ();
	... emit the new instructions ...
	insns_head = get_insns ();
	end_sequence ();

	emit_insn_before (insns_head, SPOT);

Ian


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