GIMPLE sequences are the tuple equivalent of STATEMENT_LIST
's
used in GENERIC
. They are used to chain statements together, and
when used in conjunction with sequence iterators, provide a
framework for iterating through statements.
GIMPLE sequences are of type struct gimple_sequence
, but are more
commonly passed by reference to functions dealing with sequences.
The type for a sequence pointer is gimple_seq
which is the same
as struct gimple_sequence
*. When declaring a local sequence,
you can define a local variable of type struct gimple_sequence
.
When declaring a sequence allocated on the garbage collected
heap, use the function gimple_seq_alloc
documented below.
There are convenience functions for iterating through sequences in the section entitled Sequence Iterators.
Below is a list of functions to manipulate and query sequences.
Link a gimple statement to the end of the sequence *
SEQ
ifG
is notNULL
. If *SEQ
isNULL
, allocate a sequence before linking.
Append sequence
SRC
to the end of sequence *DEST
ifSRC
is notNULL
. If *DEST
isNULL
, allocate a new sequence before appending.
Perform a deep copy of sequence
SRC
and return the result.
Reverse the order of the statements in the sequence
SEQ
. ReturnSEQ
.
Set the last statement in sequence
S
to the statement inLAST
.
Set the first statement in sequence
S
to the statement inFIRST
.
Allocate a new sequence in the garbage collected store and return it.
Copy the sequence
SRC
into the sequenceDEST
.