1*ec02198aSmrg@c Copyright (C) 2008-2020 Free Software Foundation, Inc.
210d565efSmrg@c Free Software Foundation, Inc.
310d565efSmrg@c This is part of the GCC manual.
410d565efSmrg@c For copying conditions, see the file gcc.texi.
510d565efSmrg
610d565efSmrg@node GIMPLE
710d565efSmrg@chapter GIMPLE
810d565efSmrg@cindex GIMPLE
910d565efSmrg
1010d565efSmrgGIMPLE is a three-address representation derived from GENERIC by
1110d565efSmrgbreaking down GENERIC expressions into tuples of no more than 3
1210d565efSmrgoperands (with some exceptions like function calls).  GIMPLE was
1310d565efSmrgheavily influenced by the SIMPLE IL used by the McCAT compiler
1410d565efSmrgproject at McGill University, though we have made some different
1510d565efSmrgchoices.  For one thing, SIMPLE doesn't support @code{goto}.
1610d565efSmrg
1710d565efSmrgTemporaries are introduced to hold intermediate values needed to
1810d565efSmrgcompute complex expressions. Additionally, all the control
1910d565efSmrgstructures used in GENERIC are lowered into conditional jumps,
2010d565efSmrglexical scopes are removed and exception regions are converted
2110d565efSmrginto an on the side exception region tree.
2210d565efSmrg
2310d565efSmrgThe compiler pass which converts GENERIC into GIMPLE is referred to as
2410d565efSmrgthe @samp{gimplifier}.  The gimplifier works recursively, generating
2510d565efSmrgGIMPLE tuples out of the original GENERIC expressions.
2610d565efSmrg
2710d565efSmrgOne of the early implementation strategies used for the GIMPLE
2810d565efSmrgrepresentation was to use the same internal data structures used
2910d565efSmrgby front ends to represent parse trees. This simplified
3010d565efSmrgimplementation because we could leverage existing functionality
3110d565efSmrgand interfaces. However, GIMPLE is a much more restrictive
3210d565efSmrgrepresentation than abstract syntax trees (AST), therefore it
3310d565efSmrgdoes not require the full structural complexity provided by the
3410d565efSmrgmain tree data structure.
3510d565efSmrg
3610d565efSmrgThe GENERIC representation of a function is stored in the
3710d565efSmrg@code{DECL_SAVED_TREE} field of the associated @code{FUNCTION_DECL}
3810d565efSmrgtree node.  It is converted to GIMPLE by a call to
3910d565efSmrg@code{gimplify_function_tree}.
4010d565efSmrg
4110d565efSmrgIf a front end wants to include language-specific tree codes in the tree
4210d565efSmrgrepresentation which it provides to the back end, it must provide a
4310d565efSmrgdefinition of @code{LANG_HOOKS_GIMPLIFY_EXPR} which knows how to
4410d565efSmrgconvert the front end trees to GIMPLE@.  Usually such a hook will involve
4510d565efSmrgmuch of the same code for expanding front end trees to RTL@.  This function
4610d565efSmrgcan return fully lowered GIMPLE, or it can return GENERIC trees and let the
4710d565efSmrgmain gimplifier lower them the rest of the way; this is often simpler.
4810d565efSmrgGIMPLE that is not fully lowered is known as ``High GIMPLE'' and
4910d565efSmrgconsists of the IL before the pass @code{pass_lower_cf}.  High GIMPLE
5010d565efSmrgcontains some container statements like lexical scopes
5110d565efSmrg(represented by @code{GIMPLE_BIND}) and nested expressions (e.g.,
5210d565efSmrg@code{GIMPLE_TRY}), while ``Low GIMPLE'' exposes all of the
5310d565efSmrgimplicit jumps for control and exception expressions directly in
5410d565efSmrgthe IL and EH region trees.
5510d565efSmrg
5610d565efSmrgThe C and C++ front ends currently convert directly from front end
5710d565efSmrgtrees to GIMPLE, and hand that off to the back end rather than first
5810d565efSmrgconverting to GENERIC@.  Their gimplifier hooks know about all the
5910d565efSmrg@code{_STMT} nodes and how to convert them to GENERIC forms.  There
6010d565efSmrgwas some work done on a genericization pass which would run first, but
6110d565efSmrgthe existence of @code{STMT_EXPR} meant that in order to convert all
6210d565efSmrgof the C statements into GENERIC equivalents would involve walking the
6310d565efSmrgentire tree anyway, so it was simpler to lower all the way.  This
6410d565efSmrgmight change in the future if someone writes an optimization pass
6510d565efSmrgwhich would work better with higher-level trees, but currently the
6610d565efSmrgoptimizers all expect GIMPLE@.
6710d565efSmrg
6810d565efSmrgYou can request to dump a C-like representation of the GIMPLE form
6910d565efSmrgwith the flag @option{-fdump-tree-gimple}.
7010d565efSmrg
7110d565efSmrg@menu
7210d565efSmrg* Tuple representation::
7310d565efSmrg* Class hierarchy of GIMPLE statements::
7410d565efSmrg* GIMPLE instruction set::
7510d565efSmrg* GIMPLE Exception Handling::
7610d565efSmrg* Temporaries::
7710d565efSmrg* Operands::
7810d565efSmrg* Manipulating GIMPLE statements::
7910d565efSmrg* Tuple specific accessors::
8010d565efSmrg* GIMPLE sequences::
8110d565efSmrg* Sequence iterators::
8210d565efSmrg* Adding a new GIMPLE statement code::
8310d565efSmrg* Statement and operand traversals::
8410d565efSmrg@end menu
8510d565efSmrg
8610d565efSmrg@node Tuple representation
8710d565efSmrg@section Tuple representation
8810d565efSmrg@cindex tuples
8910d565efSmrg
9010d565efSmrgGIMPLE instructions are tuples of variable size divided in two
9110d565efSmrggroups: a header describing the instruction and its locations,
9210d565efSmrgand a variable length body with all the operands. Tuples are
9310d565efSmrgorganized into a hierarchy with 3 main classes of tuples.
9410d565efSmrg
9510d565efSmrg@subsection @code{gimple} (gsbase)
9610d565efSmrg@cindex gimple
9710d565efSmrg
9810d565efSmrgThis is the root of the hierarchy, it holds basic information
9910d565efSmrgneeded by most GIMPLE statements. There are some fields that
10010d565efSmrgmay not be relevant to every GIMPLE statement, but those were
10110d565efSmrgmoved into the base structure to take advantage of holes left by
10210d565efSmrgother fields (thus making the structure more compact).  The
10310d565efSmrgstructure takes 4 words (32 bytes) on 64 bit hosts:
10410d565efSmrg
10510d565efSmrg@multitable {@code{references_memory_p}} {Size (bits)}
10610d565efSmrg@item Field				@tab Size (bits)
10710d565efSmrg@item @code{code}			@tab 8
10810d565efSmrg@item @code{subcode}			@tab 16
10910d565efSmrg@item @code{no_warning}			@tab 1
11010d565efSmrg@item @code{visited}			@tab 1
11110d565efSmrg@item @code{nontemporal_move}		@tab 1
11210d565efSmrg@item @code{plf}			@tab 2
11310d565efSmrg@item @code{modified}			@tab 1
11410d565efSmrg@item @code{has_volatile_ops}		@tab 1
11510d565efSmrg@item @code{references_memory_p}	@tab 1
11610d565efSmrg@item @code{uid}			@tab 32
11710d565efSmrg@item @code{location}			@tab 32
11810d565efSmrg@item @code{num_ops}			@tab 32
11910d565efSmrg@item @code{bb}				@tab 64
12010d565efSmrg@item @code{block}			@tab 63
12110d565efSmrg@item Total size			@tab 32 bytes
12210d565efSmrg@end multitable
12310d565efSmrg
12410d565efSmrg@itemize @bullet
12510d565efSmrg@item @code{code}
12610d565efSmrgMain identifier for a GIMPLE instruction.
12710d565efSmrg
12810d565efSmrg@item @code{subcode}
12910d565efSmrgUsed to distinguish different variants of the same basic
13010d565efSmrginstruction or provide flags applicable to a given code. The
13110d565efSmrg@code{subcode} flags field has different uses depending on the code of
13210d565efSmrgthe instruction, but mostly it distinguishes instructions of the
13310d565efSmrgsame family. The most prominent use of this field is in
13410d565efSmrgassignments, where subcode indicates the operation done on the
13510d565efSmrgRHS of the assignment. For example, a = b + c is encoded as
13610d565efSmrg@code{GIMPLE_ASSIGN <PLUS_EXPR, a, b, c>}.
13710d565efSmrg
13810d565efSmrg@item @code{no_warning}
13910d565efSmrgBitflag to indicate whether a warning has already been issued on
14010d565efSmrgthis statement.
14110d565efSmrg
14210d565efSmrg@item @code{visited}
14310d565efSmrgGeneral purpose ``visited'' marker. Set and cleared by each pass
14410d565efSmrgwhen needed.
14510d565efSmrg
14610d565efSmrg@item @code{nontemporal_move}
14710d565efSmrgBitflag used in assignments that represent non-temporal moves.
14810d565efSmrgAlthough this bitflag is only used in assignments, it was moved
14910d565efSmrginto the base to take advantage of the bit holes left by the
15010d565efSmrgprevious fields.
15110d565efSmrg
15210d565efSmrg@item @code{plf}
15310d565efSmrgPass Local Flags. This 2-bit mask can be used as general purpose
15410d565efSmrgmarkers by any pass. Passes are responsible for clearing and
15510d565efSmrgsetting these two flags accordingly.
15610d565efSmrg
15710d565efSmrg@item @code{modified}
15810d565efSmrgBitflag to indicate whether the statement has been modified.
15910d565efSmrgUsed mainly by the operand scanner to determine when to re-scan a
16010d565efSmrgstatement for operands.
16110d565efSmrg
16210d565efSmrg@item @code{has_volatile_ops}
16310d565efSmrgBitflag to indicate whether this statement contains operands that
16410d565efSmrghave been marked volatile.
16510d565efSmrg
16610d565efSmrg@item @code{references_memory_p}
16710d565efSmrgBitflag to indicate whether this statement contains memory
16810d565efSmrgreferences (i.e., its operands are either global variables, or
16910d565efSmrgpointer dereferences or anything that must reside in memory).
17010d565efSmrg
17110d565efSmrg@item @code{uid}
17210d565efSmrgThis is an unsigned integer used by passes that want to assign
17310d565efSmrgIDs to every statement. These IDs must be assigned and used by
17410d565efSmrgeach pass.
17510d565efSmrg
17610d565efSmrg@item @code{location}
17710d565efSmrgThis is a @code{location_t} identifier to specify source code
17810d565efSmrglocation for this statement. It is inherited from the front
17910d565efSmrgend.
18010d565efSmrg
18110d565efSmrg@item @code{num_ops}
18210d565efSmrgNumber of operands that this statement has. This specifies the
18310d565efSmrgsize of the operand vector embedded in the tuple. Only used in
18410d565efSmrgsome tuples, but it is declared in the base tuple to take
18510d565efSmrgadvantage of the 32-bit hole left by the previous fields.
18610d565efSmrg
18710d565efSmrg@item @code{bb}
18810d565efSmrgBasic block holding the instruction.
18910d565efSmrg
19010d565efSmrg@item @code{block}
19110d565efSmrgLexical block holding this statement.  Also used for debug
19210d565efSmrginformation generation.
19310d565efSmrg@end itemize
19410d565efSmrg
19510d565efSmrg@subsection @code{gimple_statement_with_ops}
19610d565efSmrg@cindex gimple_statement_with_ops
19710d565efSmrg
19810d565efSmrgThis tuple is actually split in two:
19910d565efSmrg@code{gimple_statement_with_ops_base} and
20010d565efSmrg@code{gimple_statement_with_ops}. This is needed to accommodate the
20110d565efSmrgway the operand vector is allocated. The operand vector is
20210d565efSmrgdefined to be an array of 1 element. So, to allocate a dynamic
20310d565efSmrgnumber of operands, the memory allocator (@code{gimple_alloc}) simply
20410d565efSmrgallocates enough memory to hold the structure itself plus @code{N
20510d565efSmrg- 1} operands which run ``off the end'' of the structure. For
20610d565efSmrgexample, to allocate space for a tuple with 3 operands,
20710d565efSmrg@code{gimple_alloc} reserves @code{sizeof (struct
20810d565efSmrggimple_statement_with_ops) + 2 * sizeof (tree)} bytes.
20910d565efSmrg
21010d565efSmrgOn the other hand, several fields in this tuple need to be shared
21110d565efSmrgwith the @code{gimple_statement_with_memory_ops} tuple. So, these
21210d565efSmrgcommon fields are placed in @code{gimple_statement_with_ops_base} which
21310d565efSmrgis then inherited from the other two tuples.
21410d565efSmrg
21510d565efSmrg
21610d565efSmrg@multitable {@code{def_ops}}	{48 + 8 * @code{num_ops} bytes}
21710d565efSmrg@item	@code{gsbase}		@tab 256
21810d565efSmrg@item	@code{def_ops}		@tab 64
21910d565efSmrg@item	@code{use_ops}		@tab 64
22010d565efSmrg@item	@code{op}		@tab @code{num_ops} * 64
22110d565efSmrg@item	Total size		@tab 48 + 8 * @code{num_ops} bytes
22210d565efSmrg@end multitable
22310d565efSmrg
22410d565efSmrg@itemize @bullet
22510d565efSmrg@item @code{gsbase}
22610d565efSmrgInherited from @code{struct gimple}.
22710d565efSmrg
22810d565efSmrg@item @code{def_ops}
22910d565efSmrgArray of pointers into the operand array indicating all the slots that
23010d565efSmrgcontain a variable written-to by the statement. This array is
23110d565efSmrgalso used for immediate use chaining. Note that it would be
23210d565efSmrgpossible to not rely on this array, but the changes required to
23310d565efSmrgimplement this are pretty invasive.
23410d565efSmrg
23510d565efSmrg@item @code{use_ops}
23610d565efSmrgSimilar to @code{def_ops} but for variables read by the statement.
23710d565efSmrg
23810d565efSmrg@item @code{op}
23910d565efSmrgArray of trees with @code{num_ops} slots.
24010d565efSmrg@end itemize
24110d565efSmrg
24210d565efSmrg@subsection @code{gimple_statement_with_memory_ops}
24310d565efSmrg
24410d565efSmrgThis tuple is essentially identical to @code{gimple_statement_with_ops},
24510d565efSmrgexcept that it contains 4 additional fields to hold vectors
24610d565efSmrgrelated memory stores and loads.  Similar to the previous case,
24710d565efSmrgthe structure is split in two to accommodate for the operand
24810d565efSmrgvector (@code{gimple_statement_with_memory_ops_base} and
24910d565efSmrg@code{gimple_statement_with_memory_ops}).
25010d565efSmrg
25110d565efSmrg
25210d565efSmrg@multitable {@code{vdef_ops}}	{80 + 8 * @code{num_ops} bytes}
25310d565efSmrg@item Field			@tab Size (bits)
25410d565efSmrg@item @code{gsbase}		@tab 256
25510d565efSmrg@item @code{def_ops}		@tab 64
25610d565efSmrg@item @code{use_ops}		@tab 64
25710d565efSmrg@item @code{vdef_ops}		@tab 64
25810d565efSmrg@item @code{vuse_ops}		@tab 64
25910d565efSmrg@item @code{stores}		@tab 64
26010d565efSmrg@item @code{loads}		@tab 64
26110d565efSmrg@item @code{op}			@tab @code{num_ops} * 64
26210d565efSmrg@item Total size		@tab 80 + 8 * @code{num_ops} bytes
26310d565efSmrg@end multitable
26410d565efSmrg
26510d565efSmrg@itemize @bullet
26610d565efSmrg@item @code{vdef_ops}
26710d565efSmrgSimilar to @code{def_ops} but for @code{VDEF} operators. There is
26810d565efSmrgone entry per memory symbol written by this statement. This is
26910d565efSmrgused to maintain the memory SSA use-def and def-def chains.
27010d565efSmrg
27110d565efSmrg@item @code{vuse_ops}
27210d565efSmrgSimilar to @code{use_ops} but for @code{VUSE} operators. There is
27310d565efSmrgone entry per memory symbol loaded by this statement. This is
27410d565efSmrgused to maintain the memory SSA use-def chains.
27510d565efSmrg
27610d565efSmrg@item @code{stores}
27710d565efSmrgBitset with all the UIDs for the symbols written-to by the
27810d565efSmrgstatement.  This is different than @code{vdef_ops} in that all the
27910d565efSmrgaffected symbols are mentioned in this set.  If memory
28010d565efSmrgpartitioning is enabled, the @code{vdef_ops} vector will refer to memory
28110d565efSmrgpartitions. Furthermore, no SSA information is stored in this
28210d565efSmrgset.
28310d565efSmrg
28410d565efSmrg@item @code{loads}
28510d565efSmrgSimilar to @code{stores}, but for memory loads. (Note that there
28610d565efSmrgis some amount of redundancy here, it should be possible to
28710d565efSmrgreduce memory utilization further by removing these sets).
28810d565efSmrg@end itemize
28910d565efSmrg
29010d565efSmrgAll the other tuples are defined in terms of these three basic
29110d565efSmrgones. Each tuple will add some fields.
29210d565efSmrg
29310d565efSmrg
29410d565efSmrg@node Class hierarchy of GIMPLE statements
29510d565efSmrg@section Class hierarchy of GIMPLE statements
29610d565efSmrg@cindex GIMPLE class hierarchy
29710d565efSmrg
29810d565efSmrgThe following diagram shows the C++ inheritance hierarchy of statement
29910d565efSmrgkinds, along with their relationships to @code{GSS_} values (layouts) and
30010d565efSmrg@code{GIMPLE_} values (codes):
30110d565efSmrg
30210d565efSmrg@smallexample
30310d565efSmrg   gimple
30410d565efSmrg     |    layout: GSS_BASE
30510d565efSmrg     |    used for 4 codes: GIMPLE_ERROR_MARK
30610d565efSmrg     |                      GIMPLE_NOP
30710d565efSmrg     |                      GIMPLE_OMP_SECTIONS_SWITCH
30810d565efSmrg     |                      GIMPLE_PREDICT
30910d565efSmrg     |
31010d565efSmrg     + gimple_statement_with_ops_base
31110d565efSmrg     |   |    (no GSS layout)
31210d565efSmrg     |   |
31310d565efSmrg     |   + gimple_statement_with_ops
31410d565efSmrg     |   |   |    layout: GSS_WITH_OPS
31510d565efSmrg     |   |   |
31610d565efSmrg     |   |   + gcond
31710d565efSmrg     |   |   |     code: GIMPLE_COND
31810d565efSmrg     |   |   |
31910d565efSmrg     |   |   + gdebug
32010d565efSmrg     |   |   |     code: GIMPLE_DEBUG
32110d565efSmrg     |   |   |
32210d565efSmrg     |   |   + ggoto
32310d565efSmrg     |   |   |     code: GIMPLE_GOTO
32410d565efSmrg     |   |   |
32510d565efSmrg     |   |   + glabel
32610d565efSmrg     |   |   |     code: GIMPLE_LABEL
32710d565efSmrg     |   |   |
32810d565efSmrg     |   |   + gswitch
32910d565efSmrg     |   |         code: GIMPLE_SWITCH
33010d565efSmrg     |   |
33110d565efSmrg     |   + gimple_statement_with_memory_ops_base
33210d565efSmrg     |       |    layout: GSS_WITH_MEM_OPS_BASE
33310d565efSmrg     |       |
33410d565efSmrg     |       + gimple_statement_with_memory_ops
33510d565efSmrg     |       |   |    layout: GSS_WITH_MEM_OPS
33610d565efSmrg     |       |   |
33710d565efSmrg     |       |   + gassign
33810d565efSmrg     |       |   |    code GIMPLE_ASSIGN
33910d565efSmrg     |       |   |
34010d565efSmrg     |       |   + greturn
34110d565efSmrg     |       |        code GIMPLE_RETURN
34210d565efSmrg     |       |
34310d565efSmrg     |       + gcall
34410d565efSmrg     |       |        layout: GSS_CALL, code: GIMPLE_CALL
34510d565efSmrg     |       |
34610d565efSmrg     |       + gasm
34710d565efSmrg     |       |        layout: GSS_ASM, code: GIMPLE_ASM
34810d565efSmrg     |       |
34910d565efSmrg     |       + gtransaction
35010d565efSmrg     |                layout: GSS_TRANSACTION, code: GIMPLE_TRANSACTION
35110d565efSmrg     |
35210d565efSmrg     + gimple_statement_omp
35310d565efSmrg     |   |    layout: GSS_OMP.  Used for code GIMPLE_OMP_SECTION
35410d565efSmrg     |   |
35510d565efSmrg     |   + gomp_critical
35610d565efSmrg     |   |        layout: GSS_OMP_CRITICAL, code: GIMPLE_OMP_CRITICAL
35710d565efSmrg     |   |
35810d565efSmrg     |   + gomp_for
35910d565efSmrg     |   |        layout: GSS_OMP_FOR, code: GIMPLE_OMP_FOR
36010d565efSmrg     |   |
36110d565efSmrg     |   + gomp_parallel_layout
36210d565efSmrg     |   |   |    layout: GSS_OMP_PARALLEL_LAYOUT
36310d565efSmrg     |   |   |
36410d565efSmrg     |   |   + gimple_statement_omp_taskreg
36510d565efSmrg     |   |   |   |
36610d565efSmrg     |   |   |   + gomp_parallel
36710d565efSmrg     |   |   |   |        code: GIMPLE_OMP_PARALLEL
36810d565efSmrg     |   |   |   |
36910d565efSmrg     |   |   |   + gomp_task
37010d565efSmrg     |   |   |            code: GIMPLE_OMP_TASK
37110d565efSmrg     |   |   |
37210d565efSmrg     |   |   + gimple_statement_omp_target
37310d565efSmrg     |   |            code: GIMPLE_OMP_TARGET
37410d565efSmrg     |   |
37510d565efSmrg     |   + gomp_sections
37610d565efSmrg     |   |        layout: GSS_OMP_SECTIONS, code: GIMPLE_OMP_SECTIONS
37710d565efSmrg     |   |
37810d565efSmrg     |   + gimple_statement_omp_single_layout
37910d565efSmrg     |       |    layout: GSS_OMP_SINGLE_LAYOUT
38010d565efSmrg     |       |
38110d565efSmrg     |       + gomp_single
38210d565efSmrg     |       |        code: GIMPLE_OMP_SINGLE
38310d565efSmrg     |       |
38410d565efSmrg     |       + gomp_teams
38510d565efSmrg     |                code: GIMPLE_OMP_TEAMS
38610d565efSmrg     |
38710d565efSmrg     + gbind
38810d565efSmrg     |        layout: GSS_BIND, code: GIMPLE_BIND
38910d565efSmrg     |
39010d565efSmrg     + gcatch
39110d565efSmrg     |        layout: GSS_CATCH, code: GIMPLE_CATCH
39210d565efSmrg     |
39310d565efSmrg     + geh_filter
39410d565efSmrg     |        layout: GSS_EH_FILTER, code: GIMPLE_EH_FILTER
39510d565efSmrg     |
39610d565efSmrg     + geh_else
39710d565efSmrg     |        layout: GSS_EH_ELSE, code: GIMPLE_EH_ELSE
39810d565efSmrg     |
39910d565efSmrg     + geh_mnt
40010d565efSmrg     |        layout: GSS_EH_MNT, code: GIMPLE_EH_MUST_NOT_THROW
40110d565efSmrg     |
40210d565efSmrg     + gphi
40310d565efSmrg     |        layout: GSS_PHI, code: GIMPLE_PHI
40410d565efSmrg     |
40510d565efSmrg     + gimple_statement_eh_ctrl
40610d565efSmrg     |   |    layout: GSS_EH_CTRL
40710d565efSmrg     |   |
40810d565efSmrg     |   + gresx
40910d565efSmrg     |   |        code: GIMPLE_RESX
41010d565efSmrg     |   |
41110d565efSmrg     |   + geh_dispatch
41210d565efSmrg     |            code: GIMPLE_EH_DISPATCH
41310d565efSmrg     |
41410d565efSmrg     + gtry
41510d565efSmrg     |        layout: GSS_TRY, code: GIMPLE_TRY
41610d565efSmrg     |
41710d565efSmrg     + gimple_statement_wce
41810d565efSmrg     |        layout: GSS_WCE, code: GIMPLE_WITH_CLEANUP_EXPR
41910d565efSmrg     |
42010d565efSmrg     + gomp_continue
42110d565efSmrg     |        layout: GSS_OMP_CONTINUE, code: GIMPLE_OMP_CONTINUE
42210d565efSmrg     |
42310d565efSmrg     + gomp_atomic_load
42410d565efSmrg     |        layout: GSS_OMP_ATOMIC_LOAD, code: GIMPLE_OMP_ATOMIC_LOAD
42510d565efSmrg     |
42610d565efSmrg     + gimple_statement_omp_atomic_store_layout
42710d565efSmrg         |    layout: GSS_OMP_ATOMIC_STORE_LAYOUT,
42810d565efSmrg         |    code: GIMPLE_OMP_ATOMIC_STORE
42910d565efSmrg         |
43010d565efSmrg         + gomp_atomic_store
43110d565efSmrg         |        code: GIMPLE_OMP_ATOMIC_STORE
43210d565efSmrg         |
43310d565efSmrg         + gomp_return
43410d565efSmrg                  code: GIMPLE_OMP_RETURN
43510d565efSmrg@end smallexample
43610d565efSmrg
43710d565efSmrg
43810d565efSmrg@node GIMPLE instruction set
43910d565efSmrg@section GIMPLE instruction set
44010d565efSmrg@cindex GIMPLE instruction set
44110d565efSmrg
44210d565efSmrgThe following table briefly describes the GIMPLE instruction set.
44310d565efSmrg
44410d565efSmrg@multitable {@code{GIMPLE_OMP_SECTIONS_SWITCH}} {High GIMPLE} {Low GIMPLE}
44510d565efSmrg@item Instruction			@tab High GIMPLE	@tab Low GIMPLE
44610d565efSmrg@item @code{GIMPLE_ASM}			@tab x			@tab x
44710d565efSmrg@item @code{GIMPLE_ASSIGN}		@tab x			@tab x
44810d565efSmrg@item @code{GIMPLE_BIND}		@tab x			@tab
44910d565efSmrg@item @code{GIMPLE_CALL}		@tab x			@tab x
45010d565efSmrg@item @code{GIMPLE_CATCH}		@tab x			@tab
45110d565efSmrg@item @code{GIMPLE_COND}		@tab x			@tab x
45210d565efSmrg@item @code{GIMPLE_DEBUG}		@tab x			@tab x
45310d565efSmrg@item @code{GIMPLE_EH_FILTER}		@tab x			@tab
45410d565efSmrg@item @code{GIMPLE_GOTO}		@tab x			@tab x
45510d565efSmrg@item @code{GIMPLE_LABEL}		@tab x			@tab x
45610d565efSmrg@item @code{GIMPLE_NOP}			@tab x			@tab x
45710d565efSmrg@item @code{GIMPLE_OMP_ATOMIC_LOAD}	@tab x			@tab x
45810d565efSmrg@item @code{GIMPLE_OMP_ATOMIC_STORE}	@tab x			@tab x
45910d565efSmrg@item @code{GIMPLE_OMP_CONTINUE}	@tab x			@tab x
46010d565efSmrg@item @code{GIMPLE_OMP_CRITICAL}	@tab x			@tab x
46110d565efSmrg@item @code{GIMPLE_OMP_FOR}		@tab x			@tab x
46210d565efSmrg@item @code{GIMPLE_OMP_MASTER}		@tab x			@tab x
46310d565efSmrg@item @code{GIMPLE_OMP_ORDERED}		@tab x			@tab x
46410d565efSmrg@item @code{GIMPLE_OMP_PARALLEL}	@tab x			@tab x
46510d565efSmrg@item @code{GIMPLE_OMP_RETURN}		@tab x			@tab x
46610d565efSmrg@item @code{GIMPLE_OMP_SECTION}		@tab x			@tab x
46710d565efSmrg@item @code{GIMPLE_OMP_SECTIONS}	@tab x			@tab x
46810d565efSmrg@item @code{GIMPLE_OMP_SECTIONS_SWITCH}	@tab x			@tab x
46910d565efSmrg@item @code{GIMPLE_OMP_SINGLE}		@tab x			@tab x
47010d565efSmrg@item @code{GIMPLE_PHI}			@tab 			@tab x
47110d565efSmrg@item @code{GIMPLE_RESX}		@tab			@tab x
47210d565efSmrg@item @code{GIMPLE_RETURN}		@tab x			@tab x
47310d565efSmrg@item @code{GIMPLE_SWITCH}		@tab x			@tab x
47410d565efSmrg@item @code{GIMPLE_TRY}			@tab x			@tab
47510d565efSmrg@end multitable
47610d565efSmrg
47710d565efSmrg@node GIMPLE Exception Handling
47810d565efSmrg@section Exception Handling
47910d565efSmrg@cindex GIMPLE Exception Handling
48010d565efSmrg
48110d565efSmrgOther exception handling constructs are represented using
48210d565efSmrg@code{GIMPLE_TRY_CATCH}.  @code{GIMPLE_TRY_CATCH} has two operands.  The
48310d565efSmrgfirst operand is a sequence of statements to execute.  If executing
48410d565efSmrgthese statements does not throw an exception, then the second operand
48510d565efSmrgis ignored.  Otherwise, if an exception is thrown, then the second
48610d565efSmrgoperand of the @code{GIMPLE_TRY_CATCH} is checked.  The second
48710d565efSmrgoperand may have the following forms:
48810d565efSmrg
48910d565efSmrg@enumerate
49010d565efSmrg
49110d565efSmrg@item A sequence of statements to execute.  When an exception occurs,
49210d565efSmrgthese statements are executed, and then the exception is rethrown.
49310d565efSmrg
49410d565efSmrg@item A sequence of @code{GIMPLE_CATCH} statements.  Each
49510d565efSmrg@code{GIMPLE_CATCH} has a list of applicable exception types and
49610d565efSmrghandler code.  If the thrown exception matches one of the caught
49710d565efSmrgtypes, the associated handler code is executed.  If the handler
49810d565efSmrgcode falls off the bottom, execution continues after the original
49910d565efSmrg@code{GIMPLE_TRY_CATCH}.
50010d565efSmrg
50110d565efSmrg@item A @code{GIMPLE_EH_FILTER} statement.  This has a list of
50210d565efSmrgpermitted exception types, and code to handle a match failure.  If the
50310d565efSmrgthrown exception does not match one of the allowed types, the
50410d565efSmrgassociated match failure code is executed.  If the thrown exception
50510d565efSmrgdoes match, it continues unwinding the stack looking for the next
50610d565efSmrghandler.
50710d565efSmrg
50810d565efSmrg@end enumerate
50910d565efSmrg
51010d565efSmrgCurrently throwing an exception is not directly represented in
51110d565efSmrgGIMPLE, since it is implemented by calling a function.  At some
51210d565efSmrgpoint in the future we will want to add some way to express that
51310d565efSmrgthe call will throw an exception of a known type.
51410d565efSmrg
51510d565efSmrgJust before running the optimizers, the compiler lowers the
51610d565efSmrghigh-level EH constructs above into a set of @samp{goto}s, magic
51710d565efSmrglabels, and EH regions.  Continuing to unwind at the end of a
51810d565efSmrgcleanup is represented with a @code{GIMPLE_RESX}.
51910d565efSmrg
52010d565efSmrg
52110d565efSmrg@node Temporaries
52210d565efSmrg@section Temporaries
52310d565efSmrg@cindex Temporaries
52410d565efSmrg
52510d565efSmrgWhen gimplification encounters a subexpression that is too
52610d565efSmrgcomplex, it creates a new temporary variable to hold the value of
52710d565efSmrgthe subexpression, and adds a new statement to initialize it
52810d565efSmrgbefore the current statement. These special temporaries are known
52910d565efSmrgas @samp{expression temporaries}, and are allocated using
53010d565efSmrg@code{get_formal_tmp_var}.  The compiler tries to always evaluate
53110d565efSmrgidentical expressions into the same temporary, to simplify
53210d565efSmrgelimination of redundant calculations.
53310d565efSmrg
53410d565efSmrgWe can only use expression temporaries when we know that it will
53510d565efSmrgnot be reevaluated before its value is used, and that it will not
53610d565efSmrgbe otherwise modified@footnote{These restrictions are derived
53710d565efSmrgfrom those in Morgan 4.8.}. Other temporaries can be allocated
53810d565efSmrgusing @code{get_initialized_tmp_var} or @code{create_tmp_var}.
53910d565efSmrg
54010d565efSmrgCurrently, an expression like @code{a = b + 5} is not reduced any
54110d565efSmrgfurther.  We tried converting it to something like
54210d565efSmrg@smallexample
54310d565efSmrgT1 = b + 5;
54410d565efSmrga = T1;
54510d565efSmrg@end smallexample
54610d565efSmrgbut this bloated the representation for minimal benefit.  However, a
54710d565efSmrgvariable which must live in memory cannot appear in an expression; its
54810d565efSmrgvalue is explicitly loaded into a temporary first.  Similarly, storing
54910d565efSmrgthe value of an expression to a memory variable goes through a
55010d565efSmrgtemporary.
55110d565efSmrg
55210d565efSmrg@node Operands
55310d565efSmrg@section Operands
55410d565efSmrg@cindex Operands
55510d565efSmrg
55610d565efSmrgIn general, expressions in GIMPLE consist of an operation and the
55710d565efSmrgappropriate number of simple operands; these operands must either be a
55810d565efSmrgGIMPLE rvalue (@code{is_gimple_val}), i.e.@: a constant or a register
55910d565efSmrgvariable.  More complex operands are factored out into temporaries, so
56010d565efSmrgthat
56110d565efSmrg@smallexample
56210d565efSmrga = b + c + d
56310d565efSmrg@end smallexample
56410d565efSmrgbecomes
56510d565efSmrg@smallexample
56610d565efSmrgT1 = b + c;
56710d565efSmrga = T1 + d;
56810d565efSmrg@end smallexample
56910d565efSmrg
57010d565efSmrgThe same rule holds for arguments to a @code{GIMPLE_CALL}.
57110d565efSmrg
57210d565efSmrgThe target of an assignment is usually a variable, but can also be a
57310d565efSmrg@code{MEM_REF} or a compound lvalue as described below.
57410d565efSmrg
57510d565efSmrg@menu
57610d565efSmrg* Compound Expressions::
57710d565efSmrg* Compound Lvalues::
57810d565efSmrg* Conditional Expressions::
57910d565efSmrg* Logical Operators::
58010d565efSmrg@end menu
58110d565efSmrg
58210d565efSmrg@node Compound Expressions
58310d565efSmrg@subsection Compound Expressions
58410d565efSmrg@cindex Compound Expressions
58510d565efSmrg
58610d565efSmrgThe left-hand side of a C comma expression is simply moved into a separate
58710d565efSmrgstatement.
58810d565efSmrg
58910d565efSmrg@node Compound Lvalues
59010d565efSmrg@subsection Compound Lvalues
59110d565efSmrg@cindex Compound Lvalues
59210d565efSmrg
59310d565efSmrgCurrently compound lvalues involving array and structure field references
59410d565efSmrgare not broken down; an expression like @code{a.b[2] = 42} is not reduced
59510d565efSmrgany further (though complex array subscripts are).  This restriction is a
59610d565efSmrgworkaround for limitations in later optimizers; if we were to convert this
59710d565efSmrgto
59810d565efSmrg
59910d565efSmrg@smallexample
60010d565efSmrgT1 = &a.b;
60110d565efSmrgT1[2] = 42;
60210d565efSmrg@end smallexample
60310d565efSmrg
60410d565efSmrgalias analysis would not remember that the reference to @code{T1[2]} came
60510d565efSmrgby way of @code{a.b}, so it would think that the assignment could alias
60610d565efSmrganother member of @code{a}; this broke @code{struct-alias-1.c}.  Future
60710d565efSmrgoptimizer improvements may make this limitation unnecessary.
60810d565efSmrg
60910d565efSmrg@node Conditional Expressions
61010d565efSmrg@subsection Conditional Expressions
61110d565efSmrg@cindex Conditional Expressions
61210d565efSmrg
61310d565efSmrgA C @code{?:} expression is converted into an @code{if} statement with
61410d565efSmrgeach branch assigning to the same temporary.  So,
61510d565efSmrg
61610d565efSmrg@smallexample
61710d565efSmrga = b ? c : d;
61810d565efSmrg@end smallexample
61910d565efSmrgbecomes
62010d565efSmrg@smallexample
62110d565efSmrgif (b == 1)
62210d565efSmrg  T1 = c;
62310d565efSmrgelse
62410d565efSmrg  T1 = d;
62510d565efSmrga = T1;
62610d565efSmrg@end smallexample
62710d565efSmrg
62810d565efSmrgThe GIMPLE level if-conversion pass re-introduces @code{?:}
62910d565efSmrgexpression, if appropriate. It is used to vectorize loops with
63010d565efSmrgconditions using vector conditional operations.
63110d565efSmrg
63210d565efSmrgNote that in GIMPLE, @code{if} statements are represented using
63310d565efSmrg@code{GIMPLE_COND}, as described below.
63410d565efSmrg
63510d565efSmrg@node Logical Operators
63610d565efSmrg@subsection Logical Operators
63710d565efSmrg@cindex Logical Operators
63810d565efSmrg
63910d565efSmrgExcept when they appear in the condition operand of a
64010d565efSmrg@code{GIMPLE_COND}, logical `and' and `or' operators are simplified
64110d565efSmrgas follows: @code{a = b && c} becomes
64210d565efSmrg
64310d565efSmrg@smallexample
64410d565efSmrgT1 = (bool)b;
64510d565efSmrgif (T1 == true)
64610d565efSmrg  T1 = (bool)c;
64710d565efSmrga = T1;
64810d565efSmrg@end smallexample
64910d565efSmrg
65010d565efSmrgNote that @code{T1} in this example cannot be an expression temporary,
65110d565efSmrgbecause it has two different assignments.
65210d565efSmrg
65310d565efSmrg@subsection Manipulating operands
65410d565efSmrg
65510d565efSmrgAll gimple operands are of type @code{tree}.  But only certain
65610d565efSmrgtypes of trees are allowed to be used as operand tuples.  Basic
65710d565efSmrgvalidation is controlled by the function
65810d565efSmrg@code{get_gimple_rhs_class}, which given a tree code, returns an
65910d565efSmrg@code{enum} with the following values of type @code{enum
66010d565efSmrggimple_rhs_class}
66110d565efSmrg
66210d565efSmrg@itemize @bullet
66310d565efSmrg@item @code{GIMPLE_INVALID_RHS}
66410d565efSmrgThe tree cannot be used as a GIMPLE operand.
66510d565efSmrg
66610d565efSmrg@item @code{GIMPLE_TERNARY_RHS}
66710d565efSmrgThe tree is a valid GIMPLE ternary operation.
66810d565efSmrg
66910d565efSmrg@item @code{GIMPLE_BINARY_RHS}
67010d565efSmrgThe tree is a valid GIMPLE binary operation.
67110d565efSmrg
67210d565efSmrg@item @code{GIMPLE_UNARY_RHS}
67310d565efSmrgThe tree is a valid GIMPLE unary operation.
67410d565efSmrg
67510d565efSmrg@item @code{GIMPLE_SINGLE_RHS}
67610d565efSmrgThe tree is a single object, that cannot be split into simpler
67710d565efSmrgoperands (for instance, @code{SSA_NAME}, @code{VAR_DECL}, @code{COMPONENT_REF}, etc).
67810d565efSmrg
67910d565efSmrgThis operand class also acts as an escape hatch for tree nodes
68010d565efSmrgthat may be flattened out into the operand vector, but would need
68110d565efSmrgmore than two slots on the RHS.  For instance, a @code{COND_EXPR}
68210d565efSmrgexpression of the form @code{(a op b) ? x : y} could be flattened
68310d565efSmrgout on the operand vector using 4 slots, but it would also
68410d565efSmrgrequire additional processing to distinguish @code{c = a op b}
68510d565efSmrgfrom @code{c = a op b ? x : y}.  Something similar occurs with
68610d565efSmrg@code{ASSERT_EXPR}.   In time, these special case tree
68710d565efSmrgexpressions should be flattened into the operand vector.
68810d565efSmrg@end itemize
68910d565efSmrg
69010d565efSmrgFor tree nodes in the categories @code{GIMPLE_TERNARY_RHS},
69110d565efSmrg@code{GIMPLE_BINARY_RHS} and @code{GIMPLE_UNARY_RHS}, they cannot be
69210d565efSmrgstored inside tuples directly.  They first need to be flattened and
69310d565efSmrgseparated into individual components.  For instance, given the GENERIC
69410d565efSmrgexpression
69510d565efSmrg
69610d565efSmrg@smallexample
69710d565efSmrga = b + c
69810d565efSmrg@end smallexample
69910d565efSmrg
70010d565efSmrgits tree representation is:
70110d565efSmrg
70210d565efSmrg@smallexample
70310d565efSmrgMODIFY_EXPR <VAR_DECL  <a>, PLUS_EXPR <VAR_DECL <b>, VAR_DECL <c>>>
70410d565efSmrg@end smallexample
70510d565efSmrg
70610d565efSmrgIn this case, the GIMPLE form for this statement is logically
70710d565efSmrgidentical to its GENERIC form but in GIMPLE, the @code{PLUS_EXPR}
70810d565efSmrgon the RHS of the assignment is not represented as a tree,
70910d565efSmrginstead the two operands are taken out of the @code{PLUS_EXPR} sub-tree
71010d565efSmrgand flattened into the GIMPLE tuple as follows:
71110d565efSmrg
71210d565efSmrg@smallexample
71310d565efSmrgGIMPLE_ASSIGN <PLUS_EXPR, VAR_DECL <a>, VAR_DECL <b>, VAR_DECL <c>>
71410d565efSmrg@end smallexample
71510d565efSmrg
71610d565efSmrg@subsection Operand vector allocation
71710d565efSmrg
71810d565efSmrgThe operand vector is stored at the bottom of the three tuple
71910d565efSmrgstructures that accept operands. This means, that depending on
72010d565efSmrgthe code of a given statement, its operand vector will be at
72110d565efSmrgdifferent offsets from the base of the structure.  To access
72210d565efSmrgtuple operands use the following accessors
72310d565efSmrg
72410d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_num_ops (gimple g)
72510d565efSmrgReturns the number of operands in statement G.
72610d565efSmrg@end deftypefn
72710d565efSmrg
72810d565efSmrg@deftypefn {GIMPLE function} tree gimple_op (gimple g, unsigned i)
72910d565efSmrgReturns operand @code{I} from statement @code{G}.
73010d565efSmrg@end deftypefn
73110d565efSmrg
73210d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_ops (gimple g)
73310d565efSmrgReturns a pointer into the operand vector for statement @code{G}.  This
73410d565efSmrgis computed using an internal table called @code{gimple_ops_offset_}[].
73510d565efSmrgThis table is indexed by the gimple code of @code{G}.
73610d565efSmrg
73710d565efSmrgWhen the compiler is built, this table is filled-in using the
73810d565efSmrgsizes of the structures used by each statement code defined in
73910d565efSmrggimple.def.  Since the operand vector is at the bottom of the
74010d565efSmrgstructure, for a gimple code @code{C} the offset is computed as sizeof
74110d565efSmrg(struct-of @code{C}) - sizeof (tree).
74210d565efSmrg
74310d565efSmrgThis mechanism adds one memory indirection to every access when
74410d565efSmrgusing @code{gimple_op}(), if this becomes a bottleneck, a pass can
74510d565efSmrgchoose to memoize the result from @code{gimple_ops}() and use that to
74610d565efSmrgaccess the operands.
74710d565efSmrg@end deftypefn
74810d565efSmrg
74910d565efSmrg@subsection Operand validation
75010d565efSmrg
75110d565efSmrgWhen adding a new operand to a gimple statement, the operand will
75210d565efSmrgbe validated according to what each tuple accepts in its operand
75310d565efSmrgvector.  These predicates are called by the
75410d565efSmrg@code{gimple_@var{name}_set_...()}.  Each tuple will use one of the
75510d565efSmrgfollowing predicates (Note, this list is not exhaustive):
75610d565efSmrg
75710d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_val (tree t)
75810d565efSmrgReturns true if t is a "GIMPLE value", which are all the
75910d565efSmrgnon-addressable stack variables (variables for which
76010d565efSmrg@code{is_gimple_reg} returns true) and constants (expressions for which
76110d565efSmrg@code{is_gimple_min_invariant} returns true).
76210d565efSmrg@end deftypefn
76310d565efSmrg
76410d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_addressable (tree t)
76510d565efSmrgReturns true if t is a symbol or memory reference whose address
76610d565efSmrgcan be taken.
76710d565efSmrg@end deftypefn
76810d565efSmrg
76910d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_asm_val (tree t)
77010d565efSmrgSimilar to @code{is_gimple_val} but it also accepts hard registers.
77110d565efSmrg@end deftypefn
77210d565efSmrg
77310d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_call_addr (tree t)
77410d565efSmrgReturn true if t is a valid expression to use as the function
77510d565efSmrgcalled by a @code{GIMPLE_CALL}.
77610d565efSmrg@end deftypefn
77710d565efSmrg
77810d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_mem_ref_addr (tree t)
77910d565efSmrgReturn true if t is a valid expression to use as first operand
78010d565efSmrgof a @code{MEM_REF} expression.
78110d565efSmrg@end deftypefn
78210d565efSmrg
78310d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_constant (tree t)
78410d565efSmrgReturn true if t is a valid gimple constant.
78510d565efSmrg@end deftypefn
78610d565efSmrg
78710d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_min_invariant (tree t)
78810d565efSmrgReturn true if t is a valid minimal invariant.  This is different
78910d565efSmrgfrom constants, in that the specific value of t may not be known
79010d565efSmrgat compile time, but it is known that it doesn't change (e.g.,
79110d565efSmrgthe address of a function local variable).
79210d565efSmrg@end deftypefn
79310d565efSmrg
79410d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_ip_invariant (tree t)
79510d565efSmrgReturn true if t is an interprocedural invariant.  This means that t
7960fc04c29Smrgis a valid invariant in all functions (e.g.@: it can be an address of a
79710d565efSmrgglobal variable but not of a local one).
79810d565efSmrg@end deftypefn
79910d565efSmrg
80010d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_ip_invariant_address (tree t)
80110d565efSmrgReturn true if t is an @code{ADDR_EXPR} that does not change once the
80210d565efSmrgprogram is running (and which is valid in all functions).
80310d565efSmrg@end deftypefn
80410d565efSmrg
80510d565efSmrg
80610d565efSmrg@subsection Statement validation
80710d565efSmrg
80810d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_assign (gimple g)
80910d565efSmrgReturn true if the code of g is @code{GIMPLE_ASSIGN}.
81010d565efSmrg@end deftypefn
81110d565efSmrg
81210d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_call (gimple g)
81310d565efSmrgReturn true if the code of g is @code{GIMPLE_CALL}.
81410d565efSmrg@end deftypefn
81510d565efSmrg
81610d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_debug (gimple g)
81710d565efSmrgReturn true if the code of g is @code{GIMPLE_DEBUG}.
81810d565efSmrg@end deftypefn
81910d565efSmrg
82010d565efSmrg@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const_gimple g)
82110d565efSmrgReturn true if g is a @code{GIMPLE_ASSIGN} that performs a type cast
82210d565efSmrgoperation.
82310d565efSmrg@end deftypefn
82410d565efSmrg
82510d565efSmrg@deftypefn {GIMPLE function} bool gimple_debug_bind_p (gimple g)
82610d565efSmrgReturn true if g is a @code{GIMPLE_DEBUG} that binds the value of an
82710d565efSmrgexpression to a variable.
82810d565efSmrg@end deftypefn
82910d565efSmrg
83010d565efSmrg@deftypefn {GIMPLE function} bool is_gimple_omp (gimple g)
83110d565efSmrgReturn true if g is any of the OpenMP codes.
83210d565efSmrg@end deftypefn
83310d565efSmrg
834c7a68eb7Smrg@deftypefn {GIMPLE function} gimple_debug_begin_stmt_p (gimple g)
835c7a68eb7SmrgReturn true if g is a @code{GIMPLE_DEBUG} that marks the beginning of
836c7a68eb7Smrga source statement.
837c7a68eb7Smrg@end deftypefn
838c7a68eb7Smrg
839c7a68eb7Smrg@deftypefn {GIMPLE function} gimple_debug_inline_entry_p (gimple g)
840c7a68eb7SmrgReturn true if g is a @code{GIMPLE_DEBUG} that marks the entry
841c7a68eb7Smrgpoint of an inlined function.
842c7a68eb7Smrg@end deftypefn
843c7a68eb7Smrg
844c7a68eb7Smrg@deftypefn {GIMPLE function} gimple_debug_nonbind_marker_p (gimple g)
845c7a68eb7SmrgReturn true if g is a @code{GIMPLE_DEBUG} that marks a program location,
846c7a68eb7Smrgwithout any variable binding.
847c7a68eb7Smrg@end deftypefn
848c7a68eb7Smrg
84910d565efSmrg@node Manipulating GIMPLE statements
85010d565efSmrg@section Manipulating GIMPLE statements
85110d565efSmrg@cindex Manipulating GIMPLE statements
85210d565efSmrg
85310d565efSmrgThis section documents all the functions available to handle each
85410d565efSmrgof the GIMPLE instructions.
85510d565efSmrg
85610d565efSmrg@subsection Common accessors
85710d565efSmrgThe following are common accessors for gimple statements.
85810d565efSmrg
85910d565efSmrg@deftypefn {GIMPLE function} {enum gimple_code} gimple_code (gimple g)
86010d565efSmrgReturn the code for statement @code{G}.
86110d565efSmrg@end deftypefn
86210d565efSmrg
86310d565efSmrg@deftypefn {GIMPLE function} basic_block gimple_bb (gimple g)
86410d565efSmrgReturn the basic block to which statement @code{G} belongs to.
86510d565efSmrg@end deftypefn
86610d565efSmrg
86710d565efSmrg@deftypefn {GIMPLE function} tree gimple_block (gimple g)
86810d565efSmrgReturn the lexical scope block holding statement @code{G}.
86910d565efSmrg@end deftypefn
87010d565efSmrg
87110d565efSmrg@deftypefn {GIMPLE function} tree gimple_expr_type (gimple stmt)
87210d565efSmrgReturn the type of the main expression computed by @code{STMT}. Return
87310d565efSmrg@code{void_type_node} if @code{STMT} computes nothing. This will only return
87410d565efSmrgsomething meaningful for @code{GIMPLE_ASSIGN}, @code{GIMPLE_COND} and
87510d565efSmrg@code{GIMPLE_CALL}.  For all other tuple codes, it will return
87610d565efSmrg@code{void_type_node}.
87710d565efSmrg@end deftypefn
87810d565efSmrg
87910d565efSmrg@deftypefn {GIMPLE function} {enum tree_code} gimple_expr_code (gimple stmt)
88010d565efSmrgReturn the tree code for the expression computed by @code{STMT}.  This
88110d565efSmrgis only meaningful for @code{GIMPLE_CALL}, @code{GIMPLE_ASSIGN} and
88210d565efSmrg@code{GIMPLE_COND}.  If @code{STMT} is @code{GIMPLE_CALL}, it will return @code{CALL_EXPR}.
88310d565efSmrgFor @code{GIMPLE_COND}, it returns the code of the comparison predicate.
88410d565efSmrgFor @code{GIMPLE_ASSIGN} it returns the code of the operation performed
88510d565efSmrgby the @code{RHS} of the assignment.
88610d565efSmrg@end deftypefn
88710d565efSmrg
88810d565efSmrg@deftypefn {GIMPLE function} void gimple_set_block (gimple g, tree block)
88910d565efSmrgSet the lexical scope block of @code{G} to @code{BLOCK}.
89010d565efSmrg@end deftypefn
89110d565efSmrg
89210d565efSmrg@deftypefn {GIMPLE function} location_t gimple_locus (gimple g)
89310d565efSmrgReturn locus information for statement @code{G}.
89410d565efSmrg@end deftypefn
89510d565efSmrg
89610d565efSmrg@deftypefn {GIMPLE function} void gimple_set_locus (gimple g, location_t locus)
89710d565efSmrgSet locus information for statement @code{G}.
89810d565efSmrg@end deftypefn
89910d565efSmrg
90010d565efSmrg@deftypefn {GIMPLE function} bool gimple_locus_empty_p (gimple g)
90110d565efSmrgReturn true if @code{G} does not have locus information.
90210d565efSmrg@end deftypefn
90310d565efSmrg
90410d565efSmrg@deftypefn {GIMPLE function} bool gimple_no_warning_p (gimple stmt)
90510d565efSmrgReturn true if no warnings should be emitted for statement @code{STMT}.
90610d565efSmrg@end deftypefn
90710d565efSmrg
90810d565efSmrg@deftypefn {GIMPLE function} void gimple_set_visited (gimple stmt, bool visited_p)
90910d565efSmrgSet the visited status on statement @code{STMT} to @code{VISITED_P}.
91010d565efSmrg@end deftypefn
91110d565efSmrg
91210d565efSmrg@deftypefn {GIMPLE function} bool gimple_visited_p (gimple stmt)
91310d565efSmrgReturn the visited status on statement @code{STMT}.
91410d565efSmrg@end deftypefn
91510d565efSmrg
91610d565efSmrg@deftypefn {GIMPLE function} void gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
91710d565efSmrgSet pass local flag @code{PLF} on statement @code{STMT} to @code{VAL_P}.
91810d565efSmrg@end deftypefn
91910d565efSmrg
92010d565efSmrg@deftypefn {GIMPLE function} {unsigned int} gimple_plf (gimple stmt, enum plf_mask plf)
92110d565efSmrgReturn the value of pass local flag @code{PLF} on statement @code{STMT}.
92210d565efSmrg@end deftypefn
92310d565efSmrg
92410d565efSmrg@deftypefn {GIMPLE function} bool gimple_has_ops (gimple g)
92510d565efSmrgReturn true if statement @code{G} has register or memory operands.
92610d565efSmrg@end deftypefn
92710d565efSmrg
92810d565efSmrg@deftypefn {GIMPLE function} bool gimple_has_mem_ops (gimple g)
92910d565efSmrgReturn true if statement @code{G} has memory operands.
93010d565efSmrg@end deftypefn
93110d565efSmrg
93210d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_num_ops (gimple g)
93310d565efSmrgReturn the number of operands for statement @code{G}.
93410d565efSmrg@end deftypefn
93510d565efSmrg
93610d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_ops (gimple g)
93710d565efSmrgReturn the array of operands for statement @code{G}.
93810d565efSmrg@end deftypefn
93910d565efSmrg
94010d565efSmrg@deftypefn {GIMPLE function} tree gimple_op (gimple g, unsigned i)
94110d565efSmrgReturn operand @code{I} for statement @code{G}.
94210d565efSmrg@end deftypefn
94310d565efSmrg
94410d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_op_ptr (gimple g, unsigned i)
94510d565efSmrgReturn a pointer to operand @code{I} for statement @code{G}.
94610d565efSmrg@end deftypefn
94710d565efSmrg
94810d565efSmrg@deftypefn {GIMPLE function} void gimple_set_op (gimple g, unsigned i, tree op)
94910d565efSmrgSet operand @code{I} of statement @code{G} to @code{OP}.
95010d565efSmrg@end deftypefn
95110d565efSmrg
95210d565efSmrg@deftypefn {GIMPLE function} bitmap gimple_addresses_taken (gimple stmt)
95310d565efSmrgReturn the set of symbols that have had their address taken by
95410d565efSmrg@code{STMT}.
95510d565efSmrg@end deftypefn
95610d565efSmrg
95710d565efSmrg@deftypefn {GIMPLE function} {struct def_optype_d *} gimple_def_ops (gimple g)
95810d565efSmrgReturn the set of @code{DEF} operands for statement @code{G}.
95910d565efSmrg@end deftypefn
96010d565efSmrg
96110d565efSmrg@deftypefn {GIMPLE function} void gimple_set_def_ops (gimple g, struct def_optype_d *def)
96210d565efSmrgSet @code{DEF} to be the set of @code{DEF} operands for statement @code{G}.
96310d565efSmrg@end deftypefn
96410d565efSmrg
96510d565efSmrg@deftypefn {GIMPLE function} {struct use_optype_d *} gimple_use_ops (gimple g)
96610d565efSmrgReturn the set of @code{USE} operands for statement @code{G}.
96710d565efSmrg@end deftypefn
96810d565efSmrg
96910d565efSmrg@deftypefn {GIMPLE function} void gimple_set_use_ops (gimple g, struct use_optype_d *use)
97010d565efSmrgSet @code{USE} to be the set of @code{USE} operands for statement @code{G}.
97110d565efSmrg@end deftypefn
97210d565efSmrg
97310d565efSmrg@deftypefn {GIMPLE function} {struct voptype_d *} gimple_vuse_ops (gimple g)
97410d565efSmrgReturn the set of @code{VUSE} operands for statement @code{G}.
97510d565efSmrg@end deftypefn
97610d565efSmrg
97710d565efSmrg@deftypefn {GIMPLE function} void gimple_set_vuse_ops (gimple g, struct voptype_d *ops)
97810d565efSmrgSet @code{OPS} to be the set of @code{VUSE} operands for statement @code{G}.
97910d565efSmrg@end deftypefn
98010d565efSmrg
98110d565efSmrg@deftypefn {GIMPLE function} {struct voptype_d *} gimple_vdef_ops (gimple g)
98210d565efSmrgReturn the set of @code{VDEF} operands for statement @code{G}.
98310d565efSmrg@end deftypefn
98410d565efSmrg
98510d565efSmrg@deftypefn {GIMPLE function} void gimple_set_vdef_ops (gimple g, struct voptype_d *ops)
98610d565efSmrgSet @code{OPS} to be the set of @code{VDEF} operands for statement @code{G}.
98710d565efSmrg@end deftypefn
98810d565efSmrg
98910d565efSmrg@deftypefn {GIMPLE function} bitmap gimple_loaded_syms (gimple g)
99010d565efSmrgReturn the set of symbols loaded by statement @code{G}.  Each element of
99110d565efSmrgthe set is the @code{DECL_UID} of the corresponding symbol.
99210d565efSmrg@end deftypefn
99310d565efSmrg
99410d565efSmrg@deftypefn {GIMPLE function} bitmap gimple_stored_syms (gimple g)
99510d565efSmrgReturn the set of symbols stored by statement @code{G}.  Each element of
99610d565efSmrgthe set is the @code{DECL_UID} of the corresponding symbol.
99710d565efSmrg@end deftypefn
99810d565efSmrg
99910d565efSmrg@deftypefn {GIMPLE function} bool gimple_modified_p (gimple g)
100010d565efSmrgReturn true if statement @code{G} has operands and the modified field
100110d565efSmrghas been set.
100210d565efSmrg@end deftypefn
100310d565efSmrg
100410d565efSmrg@deftypefn {GIMPLE function} bool gimple_has_volatile_ops (gimple stmt)
100510d565efSmrgReturn true if statement @code{STMT} contains volatile operands.
100610d565efSmrg@end deftypefn
100710d565efSmrg
100810d565efSmrg@deftypefn {GIMPLE function} void gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
100910d565efSmrgReturn true if statement @code{STMT} contains volatile operands.
101010d565efSmrg@end deftypefn
101110d565efSmrg
101210d565efSmrg@deftypefn {GIMPLE function} void update_stmt (gimple s)
101310d565efSmrgMark statement @code{S} as modified, and update it.
101410d565efSmrg@end deftypefn
101510d565efSmrg
101610d565efSmrg@deftypefn {GIMPLE function} void update_stmt_if_modified (gimple s)
101710d565efSmrgUpdate statement @code{S} if it has been marked modified.
101810d565efSmrg@end deftypefn
101910d565efSmrg
102010d565efSmrg@deftypefn {GIMPLE function} gimple gimple_copy (gimple stmt)
102110d565efSmrgReturn a deep copy of statement @code{STMT}.
102210d565efSmrg@end deftypefn
102310d565efSmrg
102410d565efSmrg@node Tuple specific accessors
102510d565efSmrg@section Tuple specific accessors
102610d565efSmrg@cindex Tuple specific accessors
102710d565efSmrg
102810d565efSmrg@menu
102910d565efSmrg* @code{GIMPLE_ASM}::
103010d565efSmrg* @code{GIMPLE_ASSIGN}::
103110d565efSmrg* @code{GIMPLE_BIND}::
103210d565efSmrg* @code{GIMPLE_CALL}::
103310d565efSmrg* @code{GIMPLE_CATCH}::
103410d565efSmrg* @code{GIMPLE_COND}::
103510d565efSmrg* @code{GIMPLE_DEBUG}::
103610d565efSmrg* @code{GIMPLE_EH_FILTER}::
103710d565efSmrg* @code{GIMPLE_LABEL}::
103810d565efSmrg* @code{GIMPLE_GOTO}::
103910d565efSmrg* @code{GIMPLE_NOP}::
104010d565efSmrg* @code{GIMPLE_OMP_ATOMIC_LOAD}::
104110d565efSmrg* @code{GIMPLE_OMP_ATOMIC_STORE}::
104210d565efSmrg* @code{GIMPLE_OMP_CONTINUE}::
104310d565efSmrg* @code{GIMPLE_OMP_CRITICAL}::
104410d565efSmrg* @code{GIMPLE_OMP_FOR}::
104510d565efSmrg* @code{GIMPLE_OMP_MASTER}::
104610d565efSmrg* @code{GIMPLE_OMP_ORDERED}::
104710d565efSmrg* @code{GIMPLE_OMP_PARALLEL}::
104810d565efSmrg* @code{GIMPLE_OMP_RETURN}::
104910d565efSmrg* @code{GIMPLE_OMP_SECTION}::
105010d565efSmrg* @code{GIMPLE_OMP_SECTIONS}::
105110d565efSmrg* @code{GIMPLE_OMP_SINGLE}::
105210d565efSmrg* @code{GIMPLE_PHI}::
105310d565efSmrg* @code{GIMPLE_RESX}::
105410d565efSmrg* @code{GIMPLE_RETURN}::
105510d565efSmrg* @code{GIMPLE_SWITCH}::
105610d565efSmrg* @code{GIMPLE_TRY}::
105710d565efSmrg* @code{GIMPLE_WITH_CLEANUP_EXPR}::
105810d565efSmrg@end menu
105910d565efSmrg
106010d565efSmrg
106110d565efSmrg@node @code{GIMPLE_ASM}
106210d565efSmrg@subsection @code{GIMPLE_ASM}
106310d565efSmrg@cindex @code{GIMPLE_ASM}
106410d565efSmrg
106510d565efSmrg@deftypefn {GIMPLE function} gasm *gimple_build_asm_vec ( @
106610d565efSmrgconst char *string, vec<tree, va_gc> *inputs, @
106710d565efSmrgvec<tree, va_gc> *outputs, vec<tree, va_gc> *clobbers, @
106810d565efSmrgvec<tree, va_gc> *labels)
106910d565efSmrgBuild a @code{GIMPLE_ASM} statement.  This statement is used for
107010d565efSmrgbuilding in-line assembly constructs.  @code{STRING} is the assembly
107110d565efSmrgcode.  @code{INPUTS}, @code{OUTPUTS}, @code{CLOBBERS}  and @code{LABELS}
107210d565efSmrgare the inputs, outputs, clobbered registers and labels.
107310d565efSmrg@end deftypefn
107410d565efSmrg
107510d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_asm_ninputs (const gasm *g)
107610d565efSmrgReturn the number of input operands for @code{GIMPLE_ASM} @code{G}.
107710d565efSmrg@end deftypefn
107810d565efSmrg
107910d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_asm_noutputs (const gasm *g)
108010d565efSmrgReturn the number of output operands for @code{GIMPLE_ASM} @code{G}.
108110d565efSmrg@end deftypefn
108210d565efSmrg
108310d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_asm_nclobbers (const gasm *g)
108410d565efSmrgReturn the number of clobber operands for @code{GIMPLE_ASM} @code{G}.
108510d565efSmrg@end deftypefn
108610d565efSmrg
108710d565efSmrg@deftypefn {GIMPLE function} tree gimple_asm_input_op (const gasm *g, @
108810d565efSmrgunsigned index)
108910d565efSmrgReturn input operand @code{INDEX} of @code{GIMPLE_ASM} @code{G}.
109010d565efSmrg@end deftypefn
109110d565efSmrg
109210d565efSmrg@deftypefn {GIMPLE function} void gimple_asm_set_input_op (gasm *g, @
109310d565efSmrgunsigned index, tree in_op)
109410d565efSmrgSet @code{IN_OP} to be input operand @code{INDEX} in @code{GIMPLE_ASM} @code{G}.
109510d565efSmrg@end deftypefn
109610d565efSmrg
109710d565efSmrg@deftypefn {GIMPLE function} tree gimple_asm_output_op (const gasm *g, @
109810d565efSmrgunsigned index)
109910d565efSmrgReturn output operand @code{INDEX} of @code{GIMPLE_ASM} @code{G}.
110010d565efSmrg@end deftypefn
110110d565efSmrg
110210d565efSmrg@deftypefn {GIMPLE function} void gimple_asm_set_output_op (gasm *g, @
110310d565efSmrgunsigned index, tree out_op)
110410d565efSmrgSet @code{OUT_OP} to be output operand @code{INDEX} in @code{GIMPLE_ASM} @code{G}.
110510d565efSmrg@end deftypefn
110610d565efSmrg
110710d565efSmrg@deftypefn {GIMPLE function} tree gimple_asm_clobber_op (const gasm *g, @
110810d565efSmrgunsigned index)
110910d565efSmrgReturn clobber operand @code{INDEX} of @code{GIMPLE_ASM} @code{G}.
111010d565efSmrg@end deftypefn
111110d565efSmrg
111210d565efSmrg@deftypefn {GIMPLE function} void gimple_asm_set_clobber_op (gasm *g, @
111310d565efSmrgunsigned index, tree clobber_op)
111410d565efSmrgSet @code{CLOBBER_OP} to be clobber operand @code{INDEX} in @code{GIMPLE_ASM} @code{G}.
111510d565efSmrg@end deftypefn
111610d565efSmrg
111710d565efSmrg@deftypefn {GIMPLE function} {const char *} gimple_asm_string (const gasm *g)
111810d565efSmrgReturn the string representing the assembly instruction in
111910d565efSmrg@code{GIMPLE_ASM} @code{G}.
112010d565efSmrg@end deftypefn
112110d565efSmrg
112210d565efSmrg@deftypefn {GIMPLE function} bool gimple_asm_volatile_p (const gasm *g)
112310d565efSmrgReturn true if @code{G} is an asm statement marked volatile.
112410d565efSmrg@end deftypefn
112510d565efSmrg
112610d565efSmrg@deftypefn {GIMPLE function} void gimple_asm_set_volatile (gasm *g, @
112710d565efSmrgbool volatile_p)
112810d565efSmrgMark asm statement @code{G} as volatile or non-volatile based on
112910d565efSmrg@code{VOLATILE_P}.
113010d565efSmrg@end deftypefn
113110d565efSmrg
113210d565efSmrg@node @code{GIMPLE_ASSIGN}
113310d565efSmrg@subsection @code{GIMPLE_ASSIGN}
113410d565efSmrg@cindex @code{GIMPLE_ASSIGN}
113510d565efSmrg
113610d565efSmrg@deftypefn {GIMPLE function} gassign *gimple_build_assign (tree lhs, tree rhs)
113710d565efSmrgBuild a @code{GIMPLE_ASSIGN} statement.  The left-hand side is an lvalue
113810d565efSmrgpassed in lhs.  The right-hand side can be either a unary or
113910d565efSmrgbinary tree expression.  The expression tree rhs will be
114010d565efSmrgflattened and its operands assigned to the corresponding operand
114110d565efSmrgslots in the new statement.  This function is useful when you
114210d565efSmrgalready have a tree expression that you want to convert into a
114310d565efSmrgtuple.  However, try to avoid building expression trees for the
114410d565efSmrgsole purpose of calling this function.  If you already have the
114510d565efSmrgoperands in separate trees, it is better to use
114610d565efSmrg@code{gimple_build_assign} with @code{enum tree_code} argument and separate
114710d565efSmrgarguments for each operand.
114810d565efSmrg@end deftypefn
114910d565efSmrg
115010d565efSmrg@deftypefn {GIMPLE function} gassign *gimple_build_assign @
115110d565efSmrg(tree lhs, enum tree_code subcode, tree op1, tree op2, tree op3)
115210d565efSmrgThis function is similar to two operand @code{gimple_build_assign},
115310d565efSmrgbut is used to build a @code{GIMPLE_ASSIGN} statement when the operands of the
115410d565efSmrgright-hand side of the assignment are already split into
115510d565efSmrgdifferent operands.
115610d565efSmrg
115710d565efSmrgThe left-hand side is an lvalue passed in lhs.  Subcode is the
115810d565efSmrg@code{tree_code} for the right-hand side of the assignment.  Op1, op2 and op3
115910d565efSmrgare the operands.
116010d565efSmrg@end deftypefn
116110d565efSmrg
116210d565efSmrg@deftypefn {GIMPLE function} gassign *gimple_build_assign @
116310d565efSmrg(tree lhs, enum tree_code subcode, tree op1, tree op2)
116410d565efSmrgLike the above 5 operand @code{gimple_build_assign}, but with the last
116510d565efSmrgargument @code{NULL} - this overload should not be used for
116610d565efSmrg@code{GIMPLE_TERNARY_RHS} assignments.
116710d565efSmrg@end deftypefn
116810d565efSmrg
116910d565efSmrg@deftypefn {GIMPLE function} gassign *gimple_build_assign @
117010d565efSmrg(tree lhs, enum tree_code subcode, tree op1)
117110d565efSmrgLike the above 4 operand @code{gimple_build_assign}, but with the last
117210d565efSmrgargument @code{NULL} - this overload should be used only for
117310d565efSmrg@code{GIMPLE_UNARY_RHS} and @code{GIMPLE_SINGLE_RHS} assignments.
117410d565efSmrg@end deftypefn
117510d565efSmrg
117610d565efSmrg@deftypefn {GIMPLE function} gimple gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
117710d565efSmrgBuild a new @code{GIMPLE_ASSIGN} tuple and append it to the end of
117810d565efSmrg@code{*SEQ_P}.
117910d565efSmrg@end deftypefn
118010d565efSmrg
118110d565efSmrg@code{DST}/@code{SRC} are the destination and source respectively.  You can
118210d565efSmrgpass ungimplified trees in @code{DST} or @code{SRC}, in which
118310d565efSmrgcase they will be converted to a gimple operand if necessary.
118410d565efSmrg
118510d565efSmrgThis function returns the newly created @code{GIMPLE_ASSIGN} tuple.
118610d565efSmrg
118710d565efSmrg@deftypefn {GIMPLE function} {enum tree_code} gimple_assign_rhs_code (gimple g)
118810d565efSmrgReturn the code of the expression computed on the @code{RHS} of
118910d565efSmrgassignment statement @code{G}.
119010d565efSmrg@end deftypefn
119110d565efSmrg
119210d565efSmrg
119310d565efSmrg@deftypefn {GIMPLE function} {enum gimple_rhs_class} gimple_assign_rhs_class (gimple g)
119410d565efSmrgReturn the gimple rhs class of the code for the expression
119510d565efSmrgcomputed on the rhs of assignment statement @code{G}.  This will never
119610d565efSmrgreturn @code{GIMPLE_INVALID_RHS}.
119710d565efSmrg@end deftypefn
119810d565efSmrg
119910d565efSmrg@deftypefn {GIMPLE function} tree gimple_assign_lhs (gimple g)
120010d565efSmrgReturn the @code{LHS} of assignment statement @code{G}.
120110d565efSmrg@end deftypefn
120210d565efSmrg
120310d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_assign_lhs_ptr (gimple g)
120410d565efSmrgReturn a pointer to the @code{LHS} of assignment statement @code{G}.
120510d565efSmrg@end deftypefn
120610d565efSmrg
120710d565efSmrg@deftypefn {GIMPLE function} tree gimple_assign_rhs1 (gimple g)
120810d565efSmrgReturn the first operand on the @code{RHS} of assignment statement @code{G}.
120910d565efSmrg@end deftypefn
121010d565efSmrg
121110d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs1_ptr (gimple g)
121210d565efSmrgReturn the address of the first operand on the @code{RHS} of assignment
121310d565efSmrgstatement @code{G}.
121410d565efSmrg@end deftypefn
121510d565efSmrg
121610d565efSmrg@deftypefn {GIMPLE function} tree gimple_assign_rhs2 (gimple g)
121710d565efSmrgReturn the second operand on the @code{RHS} of assignment statement @code{G}.
121810d565efSmrg@end deftypefn
121910d565efSmrg
122010d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs2_ptr (gimple g)
122110d565efSmrgReturn the address of the second operand on the @code{RHS} of assignment
122210d565efSmrgstatement @code{G}.
122310d565efSmrg@end deftypefn
122410d565efSmrg
122510d565efSmrg@deftypefn {GIMPLE function} tree gimple_assign_rhs3 (gimple g)
122610d565efSmrgReturn the third operand on the @code{RHS} of assignment statement @code{G}.
122710d565efSmrg@end deftypefn
122810d565efSmrg
122910d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_assign_rhs3_ptr (gimple g)
123010d565efSmrgReturn the address of the third operand on the @code{RHS} of assignment
123110d565efSmrgstatement @code{G}.
123210d565efSmrg@end deftypefn
123310d565efSmrg
123410d565efSmrg@deftypefn {GIMPLE function} void gimple_assign_set_lhs (gimple g, tree lhs)
123510d565efSmrgSet @code{LHS} to be the @code{LHS} operand of assignment statement @code{G}.
123610d565efSmrg@end deftypefn
123710d565efSmrg
123810d565efSmrg@deftypefn {GIMPLE function} void gimple_assign_set_rhs1 (gimple g, tree rhs)
123910d565efSmrgSet @code{RHS} to be the first operand on the @code{RHS} of assignment
124010d565efSmrgstatement @code{G}.
124110d565efSmrg@end deftypefn
124210d565efSmrg
124310d565efSmrg@deftypefn {GIMPLE function} void gimple_assign_set_rhs2 (gimple g, tree rhs)
124410d565efSmrgSet @code{RHS} to be the second operand on the @code{RHS} of assignment
124510d565efSmrgstatement @code{G}.
124610d565efSmrg@end deftypefn
124710d565efSmrg
124810d565efSmrg@deftypefn {GIMPLE function} void gimple_assign_set_rhs3 (gimple g, tree rhs)
124910d565efSmrgSet @code{RHS} to be the third operand on the @code{RHS} of assignment
125010d565efSmrgstatement @code{G}.
125110d565efSmrg@end deftypefn
125210d565efSmrg
125310d565efSmrg@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const_gimple s)
125410d565efSmrgReturn true if @code{S} is a type-cast assignment.
125510d565efSmrg@end deftypefn
125610d565efSmrg
125710d565efSmrg
125810d565efSmrg@node @code{GIMPLE_BIND}
125910d565efSmrg@subsection @code{GIMPLE_BIND}
126010d565efSmrg@cindex @code{GIMPLE_BIND}
126110d565efSmrg
126210d565efSmrg@deftypefn {GIMPLE function} gbind *gimple_build_bind (tree vars, @
126310d565efSmrggimple_seq body)
126410d565efSmrgBuild a @code{GIMPLE_BIND} statement with a list of variables in @code{VARS}
126510d565efSmrgand a body of statements in sequence @code{BODY}.
126610d565efSmrg@end deftypefn
126710d565efSmrg
126810d565efSmrg@deftypefn {GIMPLE function} tree gimple_bind_vars (const gbind *g)
126910d565efSmrgReturn the variables declared in the @code{GIMPLE_BIND} statement @code{G}.
127010d565efSmrg@end deftypefn
127110d565efSmrg
127210d565efSmrg@deftypefn {GIMPLE function} void gimple_bind_set_vars (gbind *g, tree vars)
127310d565efSmrgSet @code{VARS} to be the set of variables declared in the @code{GIMPLE_BIND}
127410d565efSmrgstatement @code{G}.
127510d565efSmrg@end deftypefn
127610d565efSmrg
127710d565efSmrg@deftypefn {GIMPLE function} void gimple_bind_append_vars (gbind *g, tree vars)
127810d565efSmrgAppend @code{VARS} to the set of variables declared in the @code{GIMPLE_BIND}
127910d565efSmrgstatement @code{G}.
128010d565efSmrg@end deftypefn
128110d565efSmrg
128210d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_bind_body (gbind *g)
128310d565efSmrgReturn the GIMPLE sequence contained in the @code{GIMPLE_BIND} statement
128410d565efSmrg@code{G}.
128510d565efSmrg@end deftypefn
128610d565efSmrg
128710d565efSmrg@deftypefn {GIMPLE function} void gimple_bind_set_body (gbind *g, @
128810d565efSmrggimple_seq seq)
128910d565efSmrgSet @code{SEQ} to be sequence contained in the @code{GIMPLE_BIND} statement @code{G}.
129010d565efSmrg@end deftypefn
129110d565efSmrg
129210d565efSmrg@deftypefn {GIMPLE function} void gimple_bind_add_stmt (gbind *gs, gimple stmt)
129310d565efSmrgAppend a statement to the end of a @code{GIMPLE_BIND}'s body.
129410d565efSmrg@end deftypefn
129510d565efSmrg
129610d565efSmrg@deftypefn {GIMPLE function} void gimple_bind_add_seq (gbind *gs, @
129710d565efSmrggimple_seq seq)
129810d565efSmrgAppend a sequence of statements to the end of a @code{GIMPLE_BIND}'s
129910d565efSmrgbody.
130010d565efSmrg@end deftypefn
130110d565efSmrg
130210d565efSmrg@deftypefn {GIMPLE function} tree gimple_bind_block (const gbind *g)
130310d565efSmrgReturn the @code{TREE_BLOCK} node associated with @code{GIMPLE_BIND} statement
130410d565efSmrg@code{G}. This is analogous to the @code{BIND_EXPR_BLOCK} field in trees.
130510d565efSmrg@end deftypefn
130610d565efSmrg
130710d565efSmrg@deftypefn {GIMPLE function} void gimple_bind_set_block (gbind *g, tree block)
130810d565efSmrgSet @code{BLOCK} to be the @code{TREE_BLOCK} node associated with @code{GIMPLE_BIND}
130910d565efSmrgstatement @code{G}.
131010d565efSmrg@end deftypefn
131110d565efSmrg
131210d565efSmrg
131310d565efSmrg@node @code{GIMPLE_CALL}
131410d565efSmrg@subsection @code{GIMPLE_CALL}
131510d565efSmrg@cindex @code{GIMPLE_CALL}
131610d565efSmrg
131710d565efSmrg@deftypefn {GIMPLE function} gcall *gimple_build_call (tree fn, @
131810d565efSmrgunsigned nargs, ...)
131910d565efSmrgBuild a @code{GIMPLE_CALL} statement to function @code{FN}.  The argument @code{FN}
132010d565efSmrgmust be either a @code{FUNCTION_DECL} or a gimple call address as
132110d565efSmrgdetermined by @code{is_gimple_call_addr}.  @code{NARGS} are the number of
132210d565efSmrgarguments.  The rest of the arguments follow the argument @code{NARGS},
132310d565efSmrgand must be trees that are valid as rvalues in gimple (i.e., each
132410d565efSmrgoperand is validated with @code{is_gimple_operand}).
132510d565efSmrg@end deftypefn
132610d565efSmrg
132710d565efSmrg
1328c7a68eb7Smrg@deftypefn {GIMPLE function} gcall *gimple_build_call_from_tree (tree call_expr, @
1329c7a68eb7Smrgtree fnptrtype)
1330c7a68eb7SmrgBuild a @code{GIMPLE_CALL} from a @code{CALL_EXPR} node.  The arguments
1331c7a68eb7Smrgand the function are taken from the expression directly.  The type of the
1332c7a68eb7Smrg@code{GIMPLE_CALL} is set from the second parameter passed by a caller.
1333c7a68eb7SmrgThis routine assumes that @code{call_expr} is already in GIMPLE form.
1334c7a68eb7SmrgThat is, its operands are GIMPLE values and the function call needs no further
133510d565efSmrgsimplification.  All the call flags in @code{call_expr} are copied over
133610d565efSmrgto the new @code{GIMPLE_CALL}.
133710d565efSmrg@end deftypefn
133810d565efSmrg
133910d565efSmrg@deftypefn {GIMPLE function} gcall *gimple_build_call_vec (tree fn, @
134010d565efSmrg@code{vec<tree>} args)
134110d565efSmrgIdentical to @code{gimple_build_call} but the arguments are stored in a
134210d565efSmrg@code{vec<tree>}.
134310d565efSmrg@end deftypefn
134410d565efSmrg
134510d565efSmrg@deftypefn {GIMPLE function} tree gimple_call_lhs (gimple g)
134610d565efSmrgReturn the @code{LHS} of call statement @code{G}.
134710d565efSmrg@end deftypefn
134810d565efSmrg
134910d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_call_lhs_ptr (gimple g)
135010d565efSmrgReturn a pointer to the @code{LHS} of call statement @code{G}.
135110d565efSmrg@end deftypefn
135210d565efSmrg
135310d565efSmrg@deftypefn {GIMPLE function} void gimple_call_set_lhs (gimple g, tree lhs)
135410d565efSmrgSet @code{LHS} to be the @code{LHS} operand of call statement @code{G}.
135510d565efSmrg@end deftypefn
135610d565efSmrg
135710d565efSmrg@deftypefn {GIMPLE function} tree gimple_call_fn (gimple g)
135810d565efSmrgReturn the tree node representing the function called by call
135910d565efSmrgstatement @code{G}.
136010d565efSmrg@end deftypefn
136110d565efSmrg
136210d565efSmrg@deftypefn {GIMPLE function} void gimple_call_set_fn (gcall *g, tree fn)
136310d565efSmrgSet @code{FN} to be the function called by call statement @code{G}.  This has
136410d565efSmrgto be a gimple value specifying the address of the called
136510d565efSmrgfunction.
136610d565efSmrg@end deftypefn
136710d565efSmrg
136810d565efSmrg@deftypefn {GIMPLE function} tree gimple_call_fndecl (gimple g)
136910d565efSmrgIf a given @code{GIMPLE_CALL}'s callee is a @code{FUNCTION_DECL}, return it.
137010d565efSmrgOtherwise return @code{NULL}.  This function is analogous to
137110d565efSmrg@code{get_callee_fndecl} in @code{GENERIC}.
137210d565efSmrg@end deftypefn
137310d565efSmrg
137410d565efSmrg@deftypefn {GIMPLE function} tree gimple_call_set_fndecl (gimple g, tree fndecl)
137510d565efSmrgSet the called function to @code{FNDECL}.
137610d565efSmrg@end deftypefn
137710d565efSmrg
137810d565efSmrg@deftypefn {GIMPLE function} tree gimple_call_return_type (const gcall *g)
137910d565efSmrgReturn the type returned by call statement @code{G}.
138010d565efSmrg@end deftypefn
138110d565efSmrg
138210d565efSmrg@deftypefn {GIMPLE function} tree gimple_call_chain (gimple g)
138310d565efSmrgReturn the static chain for call statement @code{G}.
138410d565efSmrg@end deftypefn
138510d565efSmrg
138610d565efSmrg@deftypefn {GIMPLE function} void gimple_call_set_chain (gcall *g, tree chain)
138710d565efSmrgSet @code{CHAIN} to be the static chain for call statement @code{G}.
138810d565efSmrg@end deftypefn
138910d565efSmrg
139010d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_call_num_args (gimple g)
139110d565efSmrgReturn the number of arguments used by call statement @code{G}.
139210d565efSmrg@end deftypefn
139310d565efSmrg
139410d565efSmrg@deftypefn {GIMPLE function} tree gimple_call_arg (gimple g, unsigned index)
139510d565efSmrgReturn the argument at position @code{INDEX} for call statement @code{G}.  The
139610d565efSmrgfirst argument is 0.
139710d565efSmrg@end deftypefn
139810d565efSmrg
139910d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_call_arg_ptr (gimple g, unsigned index)
140010d565efSmrgReturn a pointer to the argument at position @code{INDEX} for call
140110d565efSmrgstatement @code{G}.
140210d565efSmrg@end deftypefn
140310d565efSmrg
140410d565efSmrg@deftypefn {GIMPLE function} void gimple_call_set_arg (gimple g, unsigned index, tree arg)
140510d565efSmrgSet @code{ARG} to be the argument at position @code{INDEX} for call statement
140610d565efSmrg@code{G}.
140710d565efSmrg@end deftypefn
140810d565efSmrg
140910d565efSmrg@deftypefn {GIMPLE function} void gimple_call_set_tail (gcall *s)
141010d565efSmrgMark call statement @code{S} as being a tail call (i.e., a call just
141110d565efSmrgbefore the exit of a function). These calls are candidate for
141210d565efSmrgtail call optimization.
141310d565efSmrg@end deftypefn
141410d565efSmrg
141510d565efSmrg@deftypefn {GIMPLE function} bool gimple_call_tail_p (gcall *s)
141610d565efSmrgReturn true if @code{GIMPLE_CALL} @code{S} is marked as a tail call.
141710d565efSmrg@end deftypefn
141810d565efSmrg
141910d565efSmrg@deftypefn {GIMPLE function} bool gimple_call_noreturn_p (gimple s)
142010d565efSmrgReturn true if @code{S} is a noreturn call.
142110d565efSmrg@end deftypefn
142210d565efSmrg
142310d565efSmrg@deftypefn {GIMPLE function} gimple gimple_call_copy_skip_args (gcall *stmt, @
142410d565efSmrgbitmap args_to_skip)
142510d565efSmrgBuild a @code{GIMPLE_CALL} identical to @code{STMT} but skipping the arguments
142610d565efSmrgin the positions marked by the set @code{ARGS_TO_SKIP}.
142710d565efSmrg@end deftypefn
142810d565efSmrg
142910d565efSmrg
143010d565efSmrg@node @code{GIMPLE_CATCH}
143110d565efSmrg@subsection @code{GIMPLE_CATCH}
143210d565efSmrg@cindex @code{GIMPLE_CATCH}
143310d565efSmrg
143410d565efSmrg@deftypefn {GIMPLE function} gcatch *gimple_build_catch (tree types, @
143510d565efSmrggimple_seq handler)
143610d565efSmrgBuild a @code{GIMPLE_CATCH} statement.  @code{TYPES} are the tree types this
143710d565efSmrgcatch handles.  @code{HANDLER} is a sequence of statements with the code
143810d565efSmrgfor the handler.
143910d565efSmrg@end deftypefn
144010d565efSmrg
144110d565efSmrg@deftypefn {GIMPLE function} tree gimple_catch_types (const gcatch *g)
144210d565efSmrgReturn the types handled by @code{GIMPLE_CATCH} statement @code{G}.
144310d565efSmrg@end deftypefn
144410d565efSmrg
144510d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_catch_types_ptr (gcatch *g)
144610d565efSmrgReturn a pointer to the types handled by @code{GIMPLE_CATCH} statement
144710d565efSmrg@code{G}.
144810d565efSmrg@end deftypefn
144910d565efSmrg
145010d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_catch_handler (gcatch *g)
145110d565efSmrgReturn the GIMPLE sequence representing the body of the handler
145210d565efSmrgof @code{GIMPLE_CATCH} statement @code{G}.
145310d565efSmrg@end deftypefn
145410d565efSmrg
145510d565efSmrg@deftypefn {GIMPLE function} void gimple_catch_set_types (gcatch *g, tree t)
145610d565efSmrgSet @code{T} to be the set of types handled by @code{GIMPLE_CATCH} @code{G}.
145710d565efSmrg@end deftypefn
145810d565efSmrg
145910d565efSmrg@deftypefn {GIMPLE function} void gimple_catch_set_handler (gcatch *g, @
146010d565efSmrggimple_seq handler)
146110d565efSmrgSet @code{HANDLER} to be the body of @code{GIMPLE_CATCH} @code{G}.
146210d565efSmrg@end deftypefn
146310d565efSmrg
146410d565efSmrg
146510d565efSmrg@node @code{GIMPLE_COND}
146610d565efSmrg@subsection @code{GIMPLE_COND}
146710d565efSmrg@cindex @code{GIMPLE_COND}
146810d565efSmrg
146910d565efSmrg@deftypefn {GIMPLE function} gcond *gimple_build_cond ( @
147010d565efSmrgenum tree_code pred_code, tree lhs, tree rhs, tree t_label, tree f_label)
147110d565efSmrgBuild a @code{GIMPLE_COND} statement.  @code{A} @code{GIMPLE_COND} statement compares
147210d565efSmrg@code{LHS} and @code{RHS} and if the condition in @code{PRED_CODE} is true, jump to
147310d565efSmrgthe label in @code{t_label}, otherwise jump to the label in @code{f_label}.
147410d565efSmrg@code{PRED_CODE} are relational operator tree codes like @code{EQ_EXPR},
147510d565efSmrg@code{LT_EXPR}, @code{LE_EXPR}, @code{NE_EXPR}, etc.
147610d565efSmrg@end deftypefn
147710d565efSmrg
147810d565efSmrg
147910d565efSmrg@deftypefn {GIMPLE function} gcond *gimple_build_cond_from_tree (tree cond, @
148010d565efSmrgtree t_label, tree f_label)
148110d565efSmrgBuild a @code{GIMPLE_COND} statement from the conditional expression
148210d565efSmrgtree @code{COND}.  @code{T_LABEL} and @code{F_LABEL} are as in @code{gimple_build_cond}.
148310d565efSmrg@end deftypefn
148410d565efSmrg
148510d565efSmrg@deftypefn {GIMPLE function} {enum tree_code} gimple_cond_code (gimple g)
148610d565efSmrgReturn the code of the predicate computed by conditional
148710d565efSmrgstatement @code{G}.
148810d565efSmrg@end deftypefn
148910d565efSmrg
149010d565efSmrg@deftypefn {GIMPLE function} void gimple_cond_set_code (gcond *g, @
149110d565efSmrgenum tree_code code)
149210d565efSmrgSet @code{CODE} to be the predicate code for the conditional statement
149310d565efSmrg@code{G}.
149410d565efSmrg@end deftypefn
149510d565efSmrg
149610d565efSmrg@deftypefn {GIMPLE function} tree gimple_cond_lhs (gimple g)
149710d565efSmrgReturn the @code{LHS} of the predicate computed by conditional statement
149810d565efSmrg@code{G}.
149910d565efSmrg@end deftypefn
150010d565efSmrg
150110d565efSmrg@deftypefn {GIMPLE function} void gimple_cond_set_lhs (gcond *g, tree lhs)
150210d565efSmrgSet @code{LHS} to be the @code{LHS} operand of the predicate computed by
150310d565efSmrgconditional statement @code{G}.
150410d565efSmrg@end deftypefn
150510d565efSmrg
150610d565efSmrg@deftypefn {GIMPLE function} tree gimple_cond_rhs (gimple g)
150710d565efSmrgReturn the @code{RHS} operand of the predicate computed by conditional
150810d565efSmrg@code{G}.
150910d565efSmrg@end deftypefn
151010d565efSmrg
151110d565efSmrg@deftypefn {GIMPLE function} void gimple_cond_set_rhs (gcond *g, tree rhs)
151210d565efSmrgSet @code{RHS} to be the @code{RHS} operand of the predicate computed by
151310d565efSmrgconditional statement @code{G}.
151410d565efSmrg@end deftypefn
151510d565efSmrg
151610d565efSmrg@deftypefn {GIMPLE function} tree gimple_cond_true_label (const gcond *g)
151710d565efSmrgReturn the label used by conditional statement @code{G} when its
151810d565efSmrgpredicate evaluates to true.
151910d565efSmrg@end deftypefn
152010d565efSmrg
152110d565efSmrg@deftypefn {GIMPLE function} void gimple_cond_set_true_label (gcond *g, tree label)
152210d565efSmrgSet @code{LABEL} to be the label used by conditional statement @code{G} when
152310d565efSmrgits predicate evaluates to true.
152410d565efSmrg@end deftypefn
152510d565efSmrg
152610d565efSmrg@deftypefn {GIMPLE function} void gimple_cond_set_false_label (gcond *g, tree label)
152710d565efSmrgSet @code{LABEL} to be the label used by conditional statement @code{G} when
152810d565efSmrgits predicate evaluates to false.
152910d565efSmrg@end deftypefn
153010d565efSmrg
153110d565efSmrg@deftypefn {GIMPLE function} tree gimple_cond_false_label (const gcond *g)
153210d565efSmrgReturn the label used by conditional statement @code{G} when its
153310d565efSmrgpredicate evaluates to false.
153410d565efSmrg@end deftypefn
153510d565efSmrg
153610d565efSmrg@deftypefn {GIMPLE function} void gimple_cond_make_false (gcond *g)
153710d565efSmrgSet the conditional @code{COND_STMT} to be of the form 'if (1 == 0)'.
153810d565efSmrg@end deftypefn
153910d565efSmrg
154010d565efSmrg@deftypefn {GIMPLE function} void gimple_cond_make_true (gcond *g)
154110d565efSmrgSet the conditional @code{COND_STMT} to be of the form 'if (1 == 1)'.
154210d565efSmrg@end deftypefn
154310d565efSmrg
154410d565efSmrg@node @code{GIMPLE_DEBUG}
154510d565efSmrg@subsection @code{GIMPLE_DEBUG}
154610d565efSmrg@cindex @code{GIMPLE_DEBUG}
154710d565efSmrg@cindex @code{GIMPLE_DEBUG_BIND}
1548c7a68eb7Smrg@cindex @code{GIMPLE_DEBUG_BEGIN_STMT}
1549c7a68eb7Smrg@cindex @code{GIMPLE_DEBUG_INLINE_ENTRY}
155010d565efSmrg
155110d565efSmrg@deftypefn {GIMPLE function} gdebug *gimple_build_debug_bind (tree var, @
155210d565efSmrgtree value, gimple stmt)
1553c7a68eb7SmrgBuild a @code{GIMPLE_DEBUG} statement with @code{GIMPLE_DEBUG_BIND}
155410d565efSmrg@code{subcode}.  The effect of this statement is to tell debug
155510d565efSmrginformation generation machinery that the value of user variable
155610d565efSmrg@code{var} is given by @code{value} at that point, and to remain with
155710d565efSmrgthat value until @code{var} runs out of scope, a
155810d565efSmrgdynamically-subsequent debug bind statement overrides the binding, or
155910d565efSmrgconflicting values reach a control flow merge point.  Even if
156010d565efSmrgcomponents of the @code{value} expression change afterwards, the
156110d565efSmrgvariable is supposed to retain the same value, though not necessarily
156210d565efSmrgthe same location.
156310d565efSmrg
156410d565efSmrgIt is expected that @code{var} be most often a tree for automatic user
156510d565efSmrgvariables (@code{VAR_DECL} or @code{PARM_DECL}) that satisfy the
156610d565efSmrgrequirements for gimple registers, but it may also be a tree for a
156710d565efSmrgscalarized component of a user variable (@code{ARRAY_REF},
156810d565efSmrg@code{COMPONENT_REF}), or a debug temporary (@code{DEBUG_EXPR_DECL}).
156910d565efSmrg
157010d565efSmrgAs for @code{value}, it can be an arbitrary tree expression, but it is
157110d565efSmrgrecommended that it be in a suitable form for a gimple assignment
157210d565efSmrg@code{RHS}.  It is not expected that user variables that could appear
157310d565efSmrgas @code{var} ever appear in @code{value}, because in the latter we'd
157410d565efSmrghave their @code{SSA_NAME}s instead, but even if they were not in SSA
157510d565efSmrgform, user variables appearing in @code{value} are to be regarded as
157610d565efSmrgpart of the executable code space, whereas those in @code{var} are to
157710d565efSmrgbe regarded as part of the source code space.  There is no way to
157810d565efSmrgrefer to the value bound to a user variable within a @code{value}
157910d565efSmrgexpression.
158010d565efSmrg
158110d565efSmrgIf @code{value} is @code{GIMPLE_DEBUG_BIND_NOVALUE}, debug information
158210d565efSmrggeneration machinery is informed that the variable @code{var} is
158310d565efSmrgunbound, i.e., that its value is indeterminate, which sometimes means
158410d565efSmrgit is really unavailable, and other times that the compiler could not
158510d565efSmrgkeep track of it.
158610d565efSmrg
158710d565efSmrgBlock and location information for the newly-created stmt are
158810d565efSmrgtaken from @code{stmt}, if given.
158910d565efSmrg@end deftypefn
159010d565efSmrg
159110d565efSmrg@deftypefn {GIMPLE function} tree gimple_debug_bind_get_var (gimple stmt)
159210d565efSmrgReturn the user variable @var{var} that is bound at @code{stmt}.
159310d565efSmrg@end deftypefn
159410d565efSmrg
159510d565efSmrg@deftypefn {GIMPLE function} tree gimple_debug_bind_get_value (gimple stmt)
159610d565efSmrgReturn the value expression that is bound to a user variable at
159710d565efSmrg@code{stmt}.
159810d565efSmrg@end deftypefn
159910d565efSmrg
160010d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_debug_bind_get_value_ptr (gimple stmt)
160110d565efSmrgReturn a pointer to the value expression that is bound to a user
160210d565efSmrgvariable at @code{stmt}.
160310d565efSmrg@end deftypefn
160410d565efSmrg
160510d565efSmrg@deftypefn {GIMPLE function} void gimple_debug_bind_set_var (gimple stmt, tree var)
160610d565efSmrgModify the user variable bound at @code{stmt} to @var{var}.
160710d565efSmrg@end deftypefn
160810d565efSmrg
160910d565efSmrg@deftypefn {GIMPLE function} void gimple_debug_bind_set_value (gimple stmt, tree var)
161010d565efSmrgModify the value bound to the user variable bound at @code{stmt} to
161110d565efSmrg@var{value}.
161210d565efSmrg@end deftypefn
161310d565efSmrg
161410d565efSmrg@deftypefn {GIMPLE function} void gimple_debug_bind_reset_value (gimple stmt)
161510d565efSmrgModify the value bound to the user variable bound at @code{stmt} so
161610d565efSmrgthat the variable becomes unbound.
161710d565efSmrg@end deftypefn
161810d565efSmrg
161910d565efSmrg@deftypefn {GIMPLE function} bool gimple_debug_bind_has_value_p (gimple stmt)
162010d565efSmrgReturn @code{TRUE} if @code{stmt} binds a user variable to a value,
162110d565efSmrgand @code{FALSE} if it unbinds the variable.
162210d565efSmrg@end deftypefn
162310d565efSmrg
1624c7a68eb7Smrg@deftypefn {GIMPLE function} gimple gimple_build_debug_begin_stmt (tree block, location_t location)
1625c7a68eb7SmrgBuild a @code{GIMPLE_DEBUG} statement with
1626c7a68eb7Smrg@code{GIMPLE_DEBUG_BEGIN_STMT} @code{subcode}.  The effect of this
1627c7a68eb7Smrgstatement is to tell debug information generation machinery that the
1628c7a68eb7Smrguser statement at the given @code{location} and @code{block} starts at
1629c7a68eb7Smrgthe point at which the statement is inserted.  The intent is that side
16300fc04c29Smrgeffects (e.g.@: variable bindings) of all prior user statements are
1631c7a68eb7Smrgobservable, and that none of the side effects of subsequent user
1632c7a68eb7Smrgstatements are.
1633c7a68eb7Smrg@end deftypefn
1634c7a68eb7Smrg
1635c7a68eb7Smrg@deftypefn {GIMPLE function} gimple gimple_build_debug_inline_entry (tree block, location_t location)
1636c7a68eb7SmrgBuild a @code{GIMPLE_DEBUG} statement with
1637c7a68eb7Smrg@code{GIMPLE_DEBUG_INLINE_ENTRY} @code{subcode}.  The effect of this
1638c7a68eb7Smrgstatement is to tell debug information generation machinery that a
1639c7a68eb7Smrgfunction call at @code{location} underwent inline substitution, that
1640c7a68eb7Smrg@code{block} is the enclosing lexical block created for the
1641c7a68eb7Smrgsubstitution, and that at the point of the program in which the stmt is
1642c7a68eb7Smrginserted, all parameters for the inlined function are bound to the
1643c7a68eb7Smrgrespective arguments, and none of the side effects of its stmts are
1644c7a68eb7Smrgobservable.
1645c7a68eb7Smrg@end deftypefn
1646c7a68eb7Smrg
164710d565efSmrg@node @code{GIMPLE_EH_FILTER}
164810d565efSmrg@subsection @code{GIMPLE_EH_FILTER}
164910d565efSmrg@cindex @code{GIMPLE_EH_FILTER}
165010d565efSmrg
165110d565efSmrg@deftypefn {GIMPLE function} geh_filter *gimple_build_eh_filter (tree types, @
165210d565efSmrggimple_seq failure)
165310d565efSmrgBuild a @code{GIMPLE_EH_FILTER} statement.  @code{TYPES} are the filter's
165410d565efSmrgtypes.  @code{FAILURE} is a sequence with the filter's failure action.
165510d565efSmrg@end deftypefn
165610d565efSmrg
165710d565efSmrg@deftypefn {GIMPLE function} tree gimple_eh_filter_types (gimple g)
165810d565efSmrgReturn the types handled by @code{GIMPLE_EH_FILTER} statement @code{G}.
165910d565efSmrg@end deftypefn
166010d565efSmrg
166110d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_eh_filter_types_ptr (gimple g)
166210d565efSmrgReturn a pointer to the types handled by @code{GIMPLE_EH_FILTER}
166310d565efSmrgstatement @code{G}.
166410d565efSmrg@end deftypefn
166510d565efSmrg
166610d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_eh_filter_failure (gimple g)
166710d565efSmrgReturn the sequence of statement to execute when @code{GIMPLE_EH_FILTER}
166810d565efSmrgstatement fails.
166910d565efSmrg@end deftypefn
167010d565efSmrg
167110d565efSmrg@deftypefn {GIMPLE function} void gimple_eh_filter_set_types (geh_filter *g, @
167210d565efSmrgtree types)
167310d565efSmrgSet @code{TYPES} to be the set of types handled by @code{GIMPLE_EH_FILTER} @code{G}.
167410d565efSmrg@end deftypefn
167510d565efSmrg
167610d565efSmrg@deftypefn {GIMPLE function} void gimple_eh_filter_set_failure (geh_filter *g, @
167710d565efSmrggimple_seq failure)
167810d565efSmrgSet @code{FAILURE} to be the sequence of statements to execute on
167910d565efSmrgfailure for @code{GIMPLE_EH_FILTER} @code{G}.
168010d565efSmrg@end deftypefn
168110d565efSmrg
168210d565efSmrg@deftypefn {GIMPLE function} tree gimple_eh_must_not_throw_fndecl ( @
168310d565efSmrggeh_mnt *eh_mnt_stmt)
168410d565efSmrgGet the function decl to be called by the MUST_NOT_THROW region.
168510d565efSmrg@end deftypefn
168610d565efSmrg
168710d565efSmrg@deftypefn {GIMPLE function} void gimple_eh_must_not_throw_set_fndecl ( @
168810d565efSmrggeh_mnt *eh_mnt_stmt, tree decl)
168910d565efSmrgSet the function decl to be called by GS to DECL.
169010d565efSmrg@end deftypefn
169110d565efSmrg
169210d565efSmrg
169310d565efSmrg@node @code{GIMPLE_LABEL}
169410d565efSmrg@subsection @code{GIMPLE_LABEL}
169510d565efSmrg@cindex @code{GIMPLE_LABEL}
169610d565efSmrg
169710d565efSmrg@deftypefn {GIMPLE function} glabel *gimple_build_label (tree label)
169810d565efSmrgBuild a @code{GIMPLE_LABEL} statement with corresponding to the tree
169910d565efSmrglabel, @code{LABEL}.
170010d565efSmrg@end deftypefn
170110d565efSmrg
170210d565efSmrg@deftypefn {GIMPLE function} tree gimple_label_label (const glabel *g)
170310d565efSmrgReturn the @code{LABEL_DECL} node used by @code{GIMPLE_LABEL} statement @code{G}.
170410d565efSmrg@end deftypefn
170510d565efSmrg
170610d565efSmrg@deftypefn {GIMPLE function} void gimple_label_set_label (glabel *g, tree label)
170710d565efSmrgSet @code{LABEL} to be the @code{LABEL_DECL} node used by @code{GIMPLE_LABEL}
170810d565efSmrgstatement @code{G}.
170910d565efSmrg@end deftypefn
171010d565efSmrg
171110d565efSmrg@node @code{GIMPLE_GOTO}
171210d565efSmrg@subsection @code{GIMPLE_GOTO}
171310d565efSmrg@cindex @code{GIMPLE_GOTO}
171410d565efSmrg
171510d565efSmrg@deftypefn {GIMPLE function} ggoto *gimple_build_goto (tree dest)
171610d565efSmrgBuild a @code{GIMPLE_GOTO} statement to label @code{DEST}.
171710d565efSmrg@end deftypefn
171810d565efSmrg
171910d565efSmrg@deftypefn {GIMPLE function} tree gimple_goto_dest (gimple g)
172010d565efSmrgReturn the destination of the unconditional jump @code{G}.
172110d565efSmrg@end deftypefn
172210d565efSmrg
172310d565efSmrg@deftypefn {GIMPLE function} void gimple_goto_set_dest (ggoto *g, tree dest)
172410d565efSmrgSet @code{DEST} to be the destination of the unconditional jump @code{G}.
172510d565efSmrg@end deftypefn
172610d565efSmrg
172710d565efSmrg
172810d565efSmrg@node @code{GIMPLE_NOP}
172910d565efSmrg@subsection @code{GIMPLE_NOP}
173010d565efSmrg@cindex @code{GIMPLE_NOP}
173110d565efSmrg
173210d565efSmrg@deftypefn {GIMPLE function} gimple gimple_build_nop (void)
173310d565efSmrgBuild a @code{GIMPLE_NOP} statement.
173410d565efSmrg@end deftypefn
173510d565efSmrg
173610d565efSmrg@deftypefn {GIMPLE function} bool gimple_nop_p (gimple g)
173710d565efSmrgReturns @code{TRUE} if statement @code{G} is a @code{GIMPLE_NOP}.
173810d565efSmrg@end deftypefn
173910d565efSmrg
174010d565efSmrg@node @code{GIMPLE_OMP_ATOMIC_LOAD}
174110d565efSmrg@subsection @code{GIMPLE_OMP_ATOMIC_LOAD}
174210d565efSmrg@cindex @code{GIMPLE_OMP_ATOMIC_LOAD}
174310d565efSmrg
174410d565efSmrg@deftypefn {GIMPLE function} gomp_atomic_load *gimple_build_omp_atomic_load ( @
174510d565efSmrgtree lhs, tree rhs)
174610d565efSmrgBuild a @code{GIMPLE_OMP_ATOMIC_LOAD} statement.  @code{LHS} is the left-hand
174710d565efSmrgside of the assignment.  @code{RHS} is the right-hand side of the
174810d565efSmrgassignment.
174910d565efSmrg@end deftypefn
175010d565efSmrg
175110d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_atomic_load_set_lhs ( @
175210d565efSmrggomp_atomic_load *g, tree lhs)
175310d565efSmrgSet the @code{LHS} of an atomic load.
175410d565efSmrg@end deftypefn
175510d565efSmrg
175610d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_atomic_load_lhs ( @
175710d565efSmrgconst gomp_atomic_load *g)
175810d565efSmrgGet the @code{LHS} of an atomic load.
175910d565efSmrg@end deftypefn
176010d565efSmrg
176110d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_atomic_load_set_rhs ( @
176210d565efSmrggomp_atomic_load *g, tree rhs)
176310d565efSmrgSet the @code{RHS} of an atomic set.
176410d565efSmrg@end deftypefn
176510d565efSmrg
176610d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_atomic_load_rhs ( @
176710d565efSmrgconst gomp_atomic_load *g)
176810d565efSmrgGet the @code{RHS} of an atomic set.
176910d565efSmrg@end deftypefn
177010d565efSmrg
177110d565efSmrg
177210d565efSmrg@node @code{GIMPLE_OMP_ATOMIC_STORE}
177310d565efSmrg@subsection @code{GIMPLE_OMP_ATOMIC_STORE}
177410d565efSmrg@cindex @code{GIMPLE_OMP_ATOMIC_STORE}
177510d565efSmrg
177610d565efSmrg@deftypefn {GIMPLE function} gomp_atomic_store *gimple_build_omp_atomic_store ( @
177710d565efSmrgtree val)
177810d565efSmrgBuild a @code{GIMPLE_OMP_ATOMIC_STORE} statement. @code{VAL} is the value to be
177910d565efSmrgstored.
178010d565efSmrg@end deftypefn
178110d565efSmrg
178210d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_atomic_store_set_val ( @
178310d565efSmrggomp_atomic_store *g, tree val)
178410d565efSmrgSet the value being stored in an atomic store.
178510d565efSmrg@end deftypefn
178610d565efSmrg
178710d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_atomic_store_val ( @
178810d565efSmrgconst gomp_atomic_store *g)
178910d565efSmrgReturn the value being stored in an atomic store.
179010d565efSmrg@end deftypefn
179110d565efSmrg
179210d565efSmrg@node @code{GIMPLE_OMP_CONTINUE}
179310d565efSmrg@subsection @code{GIMPLE_OMP_CONTINUE}
179410d565efSmrg@cindex @code{GIMPLE_OMP_CONTINUE}
179510d565efSmrg
179610d565efSmrg@deftypefn {GIMPLE function} gomp_continue *gimple_build_omp_continue ( @
179710d565efSmrgtree control_def, tree control_use)
179810d565efSmrgBuild a @code{GIMPLE_OMP_CONTINUE} statement.  @code{CONTROL_DEF} is the
179910d565efSmrgdefinition of the control variable.  @code{CONTROL_USE} is the use of
180010d565efSmrgthe control variable.
180110d565efSmrg@end deftypefn
180210d565efSmrg
180310d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_continue_control_def ( @
180410d565efSmrgconst gomp_continue *s)
180510d565efSmrgReturn the definition of the control variable on a
180610d565efSmrg@code{GIMPLE_OMP_CONTINUE} in @code{S}.
180710d565efSmrg@end deftypefn
180810d565efSmrg
180910d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_continue_control_def_ptr ( @
181010d565efSmrggomp_continue *s)
181110d565efSmrgSame as above, but return the pointer.
181210d565efSmrg@end deftypefn
181310d565efSmrg
181410d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_continue_set_control_def ( @
181510d565efSmrggomp_continue *s)
181610d565efSmrgSet the control variable definition for a @code{GIMPLE_OMP_CONTINUE}
181710d565efSmrgstatement in @code{S}.
181810d565efSmrg@end deftypefn
181910d565efSmrg
182010d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_continue_control_use ( @
182110d565efSmrgconst gomp_continue *s)
182210d565efSmrgReturn the use of the control variable on a @code{GIMPLE_OMP_CONTINUE}
182310d565efSmrgin @code{S}.
182410d565efSmrg@end deftypefn
182510d565efSmrg
182610d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_continue_control_use_ptr ( @
182710d565efSmrggomp_continue *s)
182810d565efSmrgSame as above, but return the pointer.
182910d565efSmrg@end deftypefn
183010d565efSmrg
183110d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_continue_set_control_use ( @
183210d565efSmrggomp_continue *s)
183310d565efSmrgSet the control variable use for a @code{GIMPLE_OMP_CONTINUE} statement
183410d565efSmrgin @code{S}.
183510d565efSmrg@end deftypefn
183610d565efSmrg
183710d565efSmrg
183810d565efSmrg@node @code{GIMPLE_OMP_CRITICAL}
183910d565efSmrg@subsection @code{GIMPLE_OMP_CRITICAL}
184010d565efSmrg@cindex @code{GIMPLE_OMP_CRITICAL}
184110d565efSmrg
184210d565efSmrg@deftypefn {GIMPLE function} gomp_critical *gimple_build_omp_critical ( @
184310d565efSmrggimple_seq body, tree name)
184410d565efSmrgBuild a @code{GIMPLE_OMP_CRITICAL} statement. @code{BODY} is the sequence of
184510d565efSmrgstatements for which only one thread can execute.  @code{NAME} is an
184610d565efSmrgoptional identifier for this critical block.
184710d565efSmrg@end deftypefn
184810d565efSmrg
184910d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_critical_name ( @
185010d565efSmrgconst gomp_critical *g)
185110d565efSmrgReturn the name associated with @code{OMP_CRITICAL} statement @code{G}.
185210d565efSmrg@end deftypefn
185310d565efSmrg
185410d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_critical_name_ptr ( @
185510d565efSmrggomp_critical *g)
185610d565efSmrgReturn a pointer to the name associated with @code{OMP} critical
185710d565efSmrgstatement @code{G}.
185810d565efSmrg@end deftypefn
185910d565efSmrg
186010d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_critical_set_name ( @
186110d565efSmrggomp_critical *g, tree name)
186210d565efSmrgSet @code{NAME} to be the name associated with @code{OMP} critical statement @code{G}.
186310d565efSmrg@end deftypefn
186410d565efSmrg
186510d565efSmrg@node @code{GIMPLE_OMP_FOR}
186610d565efSmrg@subsection @code{GIMPLE_OMP_FOR}
186710d565efSmrg@cindex @code{GIMPLE_OMP_FOR}
186810d565efSmrg
186910d565efSmrg@deftypefn {GIMPLE function} gomp_for *gimple_build_omp_for (gimple_seq body, @
187010d565efSmrgtree clauses, tree index, tree initial, tree final, tree incr, @
187110d565efSmrggimple_seq pre_body, enum tree_code omp_for_cond)
187210d565efSmrgBuild a @code{GIMPLE_OMP_FOR} statement. @code{BODY} is sequence of statements
187310d565efSmrginside the for loop.  @code{CLAUSES}, are any of the loop
187410d565efSmrgconstruct's clauses.  @code{PRE_BODY} is the
187510d565efSmrgsequence of statements that are loop invariant.  @code{INDEX} is the
187610d565efSmrgindex variable.  @code{INITIAL} is the initial value of @code{INDEX}.  @code{FINAL} is
187710d565efSmrgfinal value of @code{INDEX}.  OMP_FOR_COND is the predicate used to
187810d565efSmrgcompare @code{INDEX} and @code{FINAL}.  @code{INCR} is the increment expression.
187910d565efSmrg@end deftypefn
188010d565efSmrg
188110d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_for_clauses (gimple g)
188210d565efSmrgReturn the clauses associated with @code{OMP_FOR} @code{G}.
188310d565efSmrg@end deftypefn
188410d565efSmrg
188510d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_for_clauses_ptr (gimple g)
188610d565efSmrgReturn a pointer to the @code{OMP_FOR} @code{G}.
188710d565efSmrg@end deftypefn
188810d565efSmrg
188910d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_for_set_clauses (gimple g, tree clauses)
189010d565efSmrgSet @code{CLAUSES} to be the list of clauses associated with @code{OMP_FOR} @code{G}.
189110d565efSmrg@end deftypefn
189210d565efSmrg
189310d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_for_index (gimple g)
189410d565efSmrgReturn the index variable for @code{OMP_FOR} @code{G}.
189510d565efSmrg@end deftypefn
189610d565efSmrg
189710d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_for_index_ptr (gimple g)
189810d565efSmrgReturn a pointer to the index variable for @code{OMP_FOR} @code{G}.
189910d565efSmrg@end deftypefn
190010d565efSmrg
190110d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_for_set_index (gimple g, tree index)
190210d565efSmrgSet @code{INDEX} to be the index variable for @code{OMP_FOR} @code{G}.
190310d565efSmrg@end deftypefn
190410d565efSmrg
190510d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_for_initial (gimple g)
190610d565efSmrgReturn the initial value for @code{OMP_FOR} @code{G}.
190710d565efSmrg@end deftypefn
190810d565efSmrg
190910d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_for_initial_ptr (gimple g)
191010d565efSmrgReturn a pointer to the initial value for @code{OMP_FOR} @code{G}.
191110d565efSmrg@end deftypefn
191210d565efSmrg
191310d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_for_set_initial (gimple g, tree initial)
191410d565efSmrgSet @code{INITIAL} to be the initial value for @code{OMP_FOR} @code{G}.
191510d565efSmrg@end deftypefn
191610d565efSmrg
191710d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_for_final (gimple g)
191810d565efSmrgReturn the final value for @code{OMP_FOR} @code{G}.
191910d565efSmrg@end deftypefn
192010d565efSmrg
192110d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_for_final_ptr (gimple g)
192210d565efSmrgturn a pointer to the final value for @code{OMP_FOR} @code{G}.
192310d565efSmrg@end deftypefn
192410d565efSmrg
192510d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_for_set_final (gimple g, tree final)
192610d565efSmrgSet @code{FINAL} to be the final value for @code{OMP_FOR} @code{G}.
192710d565efSmrg@end deftypefn
192810d565efSmrg
192910d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_for_incr (gimple g)
193010d565efSmrgReturn the increment value for @code{OMP_FOR} @code{G}.
193110d565efSmrg@end deftypefn
193210d565efSmrg
193310d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_for_incr_ptr (gimple g)
193410d565efSmrgReturn a pointer to the increment value for @code{OMP_FOR} @code{G}.
193510d565efSmrg@end deftypefn
193610d565efSmrg
193710d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_for_set_incr (gimple g, tree incr)
193810d565efSmrgSet @code{INCR} to be the increment value for @code{OMP_FOR} @code{G}.
193910d565efSmrg@end deftypefn
194010d565efSmrg
194110d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_omp_for_pre_body (gimple g)
194210d565efSmrgReturn the sequence of statements to execute before the @code{OMP_FOR}
194310d565efSmrgstatement @code{G} starts.
194410d565efSmrg@end deftypefn
194510d565efSmrg
194610d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_for_set_pre_body (gimple g, gimple_seq pre_body)
194710d565efSmrgSet @code{PRE_BODY} to be the sequence of statements to execute before
194810d565efSmrgthe @code{OMP_FOR} statement @code{G} starts.
194910d565efSmrg@end deftypefn
195010d565efSmrg
195110d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_for_set_cond (gimple g, enum tree_code cond)
195210d565efSmrgSet @code{COND} to be the condition code for @code{OMP_FOR} @code{G}.
195310d565efSmrg@end deftypefn
195410d565efSmrg
195510d565efSmrg@deftypefn {GIMPLE function} {enum tree_code} gimple_omp_for_cond (gimple g)
195610d565efSmrgReturn the condition code associated with @code{OMP_FOR} @code{G}.
195710d565efSmrg@end deftypefn
195810d565efSmrg
195910d565efSmrg
196010d565efSmrg@node @code{GIMPLE_OMP_MASTER}
196110d565efSmrg@subsection @code{GIMPLE_OMP_MASTER}
196210d565efSmrg@cindex @code{GIMPLE_OMP_MASTER}
196310d565efSmrg
196410d565efSmrg@deftypefn {GIMPLE function} gimple gimple_build_omp_master (gimple_seq body)
196510d565efSmrgBuild a @code{GIMPLE_OMP_MASTER} statement. @code{BODY} is the sequence of
196610d565efSmrgstatements to be executed by just the master.
196710d565efSmrg@end deftypefn
196810d565efSmrg
196910d565efSmrg
197010d565efSmrg@node @code{GIMPLE_OMP_ORDERED}
197110d565efSmrg@subsection @code{GIMPLE_OMP_ORDERED}
197210d565efSmrg@cindex @code{GIMPLE_OMP_ORDERED}
197310d565efSmrg
197410d565efSmrg@deftypefn {GIMPLE function} gimple gimple_build_omp_ordered (gimple_seq body)
197510d565efSmrgBuild a @code{GIMPLE_OMP_ORDERED} statement.
197610d565efSmrg@end deftypefn
197710d565efSmrg
197810d565efSmrg@code{BODY} is the sequence of statements inside a loop that will
197910d565efSmrgexecuted in sequence.
198010d565efSmrg
198110d565efSmrg
198210d565efSmrg@node @code{GIMPLE_OMP_PARALLEL}
198310d565efSmrg@subsection @code{GIMPLE_OMP_PARALLEL}
198410d565efSmrg@cindex @code{GIMPLE_OMP_PARALLEL}
198510d565efSmrg
198610d565efSmrg@deftypefn {GIMPLE function} gomp_parallel *gimple_build_omp_parallel (@
198710d565efSmrggimple_seq body, tree clauses, tree child_fn, tree data_arg)
198810d565efSmrgBuild a @code{GIMPLE_OMP_PARALLEL} statement.
198910d565efSmrg@end deftypefn
199010d565efSmrg
199110d565efSmrg@code{BODY} is sequence of statements which are executed in parallel.
199210d565efSmrg@code{CLAUSES}, are the @code{OMP} parallel construct's clauses.  @code{CHILD_FN} is
199310d565efSmrgthe function created for the parallel threads to execute.
199410d565efSmrg@code{DATA_ARG} are the shared data argument(s).
199510d565efSmrg
199610d565efSmrg@deftypefn {GIMPLE function} bool gimple_omp_parallel_combined_p (gimple g)
199710d565efSmrgReturn true if @code{OMP} parallel statement @code{G} has the
199810d565efSmrg@code{GF_OMP_PARALLEL_COMBINED} flag set.
199910d565efSmrg@end deftypefn
200010d565efSmrg
200110d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_parallel_set_combined_p (gimple g)
200210d565efSmrgSet the @code{GF_OMP_PARALLEL_COMBINED} field in @code{OMP} parallel statement
200310d565efSmrg@code{G}.
200410d565efSmrg@end deftypefn
200510d565efSmrg
200610d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_omp_body (gimple g)
200710d565efSmrgReturn the body for the @code{OMP} statement @code{G}.
200810d565efSmrg@end deftypefn
200910d565efSmrg
201010d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_set_body (gimple g, gimple_seq body)
201110d565efSmrgSet @code{BODY} to be the body for the @code{OMP} statement @code{G}.
201210d565efSmrg@end deftypefn
201310d565efSmrg
201410d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_parallel_clauses (gimple g)
201510d565efSmrgReturn the clauses associated with @code{OMP_PARALLEL} @code{G}.
201610d565efSmrg@end deftypefn
201710d565efSmrg
201810d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_parallel_clauses_ptr ( @
201910d565efSmrggomp_parallel *g)
202010d565efSmrgReturn a pointer to the clauses associated with @code{OMP_PARALLEL} @code{G}.
202110d565efSmrg@end deftypefn
202210d565efSmrg
202310d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_parallel_set_clauses ( @
202410d565efSmrggomp_parallel *g, tree clauses)
202510d565efSmrgSet @code{CLAUSES} to be the list of clauses associated with
202610d565efSmrg@code{OMP_PARALLEL} @code{G}.
202710d565efSmrg@end deftypefn
202810d565efSmrg
202910d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_parallel_child_fn ( @
203010d565efSmrgconst gomp_parallel *g)
203110d565efSmrgReturn the child function used to hold the body of @code{OMP_PARALLEL}
203210d565efSmrg@code{G}.
203310d565efSmrg@end deftypefn
203410d565efSmrg
203510d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_parallel_child_fn_ptr ( @
203610d565efSmrggomp_parallel *g)
203710d565efSmrgReturn a pointer to the child function used to hold the body of
203810d565efSmrg@code{OMP_PARALLEL} @code{G}.
203910d565efSmrg@end deftypefn
204010d565efSmrg
204110d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_parallel_set_child_fn ( @
204210d565efSmrggomp_parallel *g, tree child_fn)
204310d565efSmrgSet @code{CHILD_FN} to be the child function for @code{OMP_PARALLEL} @code{G}.
204410d565efSmrg@end deftypefn
204510d565efSmrg
204610d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_parallel_data_arg ( @
204710d565efSmrgconst gomp_parallel *g)
204810d565efSmrgReturn the artificial argument used to send variables and values
204910d565efSmrgfrom the parent to the children threads in @code{OMP_PARALLEL} @code{G}.
205010d565efSmrg@end deftypefn
205110d565efSmrg
205210d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_parallel_data_arg_ptr ( @
205310d565efSmrggomp_parallel *g)
205410d565efSmrgReturn a pointer to the data argument for @code{OMP_PARALLEL} @code{G}.
205510d565efSmrg@end deftypefn
205610d565efSmrg
205710d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_parallel_set_data_arg ( @
205810d565efSmrggomp_parallel *g, tree data_arg)
205910d565efSmrgSet @code{DATA_ARG} to be the data argument for @code{OMP_PARALLEL} @code{G}.
206010d565efSmrg@end deftypefn
206110d565efSmrg
206210d565efSmrg
206310d565efSmrg@node @code{GIMPLE_OMP_RETURN}
206410d565efSmrg@subsection @code{GIMPLE_OMP_RETURN}
206510d565efSmrg@cindex @code{GIMPLE_OMP_RETURN}
206610d565efSmrg
206710d565efSmrg@deftypefn {GIMPLE function} gimple gimple_build_omp_return (bool wait_p)
206810d565efSmrgBuild a @code{GIMPLE_OMP_RETURN} statement. @code{WAIT_P} is true if this is a
206910d565efSmrgnon-waiting return.
207010d565efSmrg@end deftypefn
207110d565efSmrg
207210d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_return_set_nowait (gimple s)
207310d565efSmrgSet the nowait flag on @code{GIMPLE_OMP_RETURN} statement @code{S}.
207410d565efSmrg@end deftypefn
207510d565efSmrg
207610d565efSmrg
207710d565efSmrg@deftypefn {GIMPLE function} bool gimple_omp_return_nowait_p (gimple g)
207810d565efSmrgReturn true if @code{OMP} return statement @code{G} has the
207910d565efSmrg@code{GF_OMP_RETURN_NOWAIT} flag set.
208010d565efSmrg@end deftypefn
208110d565efSmrg
208210d565efSmrg@node @code{GIMPLE_OMP_SECTION}
208310d565efSmrg@subsection @code{GIMPLE_OMP_SECTION}
208410d565efSmrg@cindex @code{GIMPLE_OMP_SECTION}
208510d565efSmrg
208610d565efSmrg@deftypefn {GIMPLE function} gimple gimple_build_omp_section (gimple_seq body)
208710d565efSmrgBuild a @code{GIMPLE_OMP_SECTION} statement for a sections statement.
208810d565efSmrg@end deftypefn
208910d565efSmrg
209010d565efSmrg@code{BODY} is the sequence of statements in the section.
209110d565efSmrg
209210d565efSmrg@deftypefn {GIMPLE function} bool gimple_omp_section_last_p (gimple g)
209310d565efSmrgReturn true if @code{OMP} section statement @code{G} has the
209410d565efSmrg@code{GF_OMP_SECTION_LAST} flag set.
209510d565efSmrg@end deftypefn
209610d565efSmrg
209710d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_section_set_last (gimple g)
209810d565efSmrgSet the @code{GF_OMP_SECTION_LAST} flag on @code{G}.
209910d565efSmrg@end deftypefn
210010d565efSmrg
210110d565efSmrg@node @code{GIMPLE_OMP_SECTIONS}
210210d565efSmrg@subsection @code{GIMPLE_OMP_SECTIONS}
210310d565efSmrg@cindex @code{GIMPLE_OMP_SECTIONS}
210410d565efSmrg
210510d565efSmrg@deftypefn {GIMPLE function} gomp_sections *gimple_build_omp_sections ( @
210610d565efSmrggimple_seq body, tree clauses)
210710d565efSmrgBuild a @code{GIMPLE_OMP_SECTIONS} statement. @code{BODY} is a sequence of
210810d565efSmrgsection statements.  @code{CLAUSES} are any of the @code{OMP} sections
210910d565efSmrgconstruct's clauses: private, firstprivate, lastprivate,
211010d565efSmrgreduction, and nowait.
211110d565efSmrg@end deftypefn
211210d565efSmrg
211310d565efSmrg
211410d565efSmrg@deftypefn {GIMPLE function} gimple gimple_build_omp_sections_switch (void)
211510d565efSmrgBuild a @code{GIMPLE_OMP_SECTIONS_SWITCH} statement.
211610d565efSmrg@end deftypefn
211710d565efSmrg
211810d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_sections_control (gimple g)
211910d565efSmrgReturn the control variable associated with the
212010d565efSmrg@code{GIMPLE_OMP_SECTIONS} in @code{G}.
212110d565efSmrg@end deftypefn
212210d565efSmrg
212310d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_sections_control_ptr (gimple g)
212410d565efSmrgReturn a pointer to the clauses associated with the
212510d565efSmrg@code{GIMPLE_OMP_SECTIONS} in @code{G}.
212610d565efSmrg@end deftypefn
212710d565efSmrg
212810d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_sections_set_control (gimple g, tree control)
212910d565efSmrgSet @code{CONTROL} to be the set of clauses associated with the
213010d565efSmrg@code{GIMPLE_OMP_SECTIONS} in @code{G}.
213110d565efSmrg@end deftypefn
213210d565efSmrg
213310d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_sections_clauses (gimple g)
213410d565efSmrgReturn the clauses associated with @code{OMP_SECTIONS} @code{G}.
213510d565efSmrg@end deftypefn
213610d565efSmrg
213710d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_sections_clauses_ptr (gimple g)
213810d565efSmrgReturn a pointer to the clauses associated with @code{OMP_SECTIONS} @code{G}.
213910d565efSmrg@end deftypefn
214010d565efSmrg
214110d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_sections_set_clauses (gimple g, tree clauses)
214210d565efSmrgSet @code{CLAUSES} to be the set of clauses associated with @code{OMP_SECTIONS}
214310d565efSmrg@code{G}.
214410d565efSmrg@end deftypefn
214510d565efSmrg
214610d565efSmrg
214710d565efSmrg@node @code{GIMPLE_OMP_SINGLE}
214810d565efSmrg@subsection @code{GIMPLE_OMP_SINGLE}
214910d565efSmrg@cindex @code{GIMPLE_OMP_SINGLE}
215010d565efSmrg
215110d565efSmrg@deftypefn {GIMPLE function} gomp_single *gimple_build_omp_single ( @
215210d565efSmrggimple_seq body, tree clauses)
215310d565efSmrgBuild a @code{GIMPLE_OMP_SINGLE} statement. @code{BODY} is the sequence of
215410d565efSmrgstatements that will be executed once.  @code{CLAUSES} are any of the
215510d565efSmrg@code{OMP} single construct's clauses: private, firstprivate,
215610d565efSmrgcopyprivate, nowait.
215710d565efSmrg@end deftypefn
215810d565efSmrg
215910d565efSmrg@deftypefn {GIMPLE function} tree gimple_omp_single_clauses (gimple g)
216010d565efSmrgReturn the clauses associated with @code{OMP_SINGLE} @code{G}.
216110d565efSmrg@end deftypefn
216210d565efSmrg
216310d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_omp_single_clauses_ptr (gimple g)
216410d565efSmrgReturn a pointer to the clauses associated with @code{OMP_SINGLE} @code{G}.
216510d565efSmrg@end deftypefn
216610d565efSmrg
216710d565efSmrg@deftypefn {GIMPLE function} void gimple_omp_single_set_clauses ( @
216810d565efSmrggomp_single *g, tree clauses)
216910d565efSmrgSet @code{CLAUSES} to be the clauses associated with @code{OMP_SINGLE} @code{G}.
217010d565efSmrg@end deftypefn
217110d565efSmrg
217210d565efSmrg
217310d565efSmrg@node @code{GIMPLE_PHI}
217410d565efSmrg@subsection @code{GIMPLE_PHI}
217510d565efSmrg@cindex @code{GIMPLE_PHI}
217610d565efSmrg
217710d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_phi_capacity (gimple g)
217810d565efSmrgReturn the maximum number of arguments supported by @code{GIMPLE_PHI} @code{G}.
217910d565efSmrg@end deftypefn
218010d565efSmrg
218110d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_phi_num_args (gimple g)
218210d565efSmrgReturn the number of arguments in @code{GIMPLE_PHI} @code{G}. This must always
218310d565efSmrgbe exactly the number of incoming edges for the basic block
218410d565efSmrgholding @code{G}.
218510d565efSmrg@end deftypefn
218610d565efSmrg
218710d565efSmrg@deftypefn {GIMPLE function} tree gimple_phi_result (gimple g)
218810d565efSmrgReturn the @code{SSA} name created by @code{GIMPLE_PHI} @code{G}.
218910d565efSmrg@end deftypefn
219010d565efSmrg
219110d565efSmrg@deftypefn {GIMPLE function} {tree *} gimple_phi_result_ptr (gimple g)
219210d565efSmrgReturn a pointer to the @code{SSA} name created by @code{GIMPLE_PHI} @code{G}.
219310d565efSmrg@end deftypefn
219410d565efSmrg
219510d565efSmrg@deftypefn {GIMPLE function} void gimple_phi_set_result (gphi *g, tree result)
219610d565efSmrgSet @code{RESULT} to be the @code{SSA} name created by @code{GIMPLE_PHI} @code{G}.
219710d565efSmrg@end deftypefn
219810d565efSmrg
219910d565efSmrg@deftypefn {GIMPLE function} {struct phi_arg_d *} gimple_phi_arg (gimple g, index)
220010d565efSmrgReturn the @code{PHI} argument corresponding to incoming edge @code{INDEX} for
220110d565efSmrg@code{GIMPLE_PHI} @code{G}.
220210d565efSmrg@end deftypefn
220310d565efSmrg
220410d565efSmrg@deftypefn {GIMPLE function} void gimple_phi_set_arg (gphi *g, index, @
220510d565efSmrgstruct phi_arg_d * phiarg)
220610d565efSmrgSet @code{PHIARG} to be the argument corresponding to incoming edge
220710d565efSmrg@code{INDEX} for @code{GIMPLE_PHI} @code{G}.
220810d565efSmrg@end deftypefn
220910d565efSmrg
221010d565efSmrg@node @code{GIMPLE_RESX}
221110d565efSmrg@subsection @code{GIMPLE_RESX}
221210d565efSmrg@cindex @code{GIMPLE_RESX}
221310d565efSmrg
221410d565efSmrg@deftypefn {GIMPLE function} gresx *gimple_build_resx (int region)
221510d565efSmrgBuild a @code{GIMPLE_RESX} statement which is a statement.  This
221610d565efSmrgstatement is a placeholder for _Unwind_Resume before we know if a
221710d565efSmrgfunction call or a branch is needed.  @code{REGION} is the exception
221810d565efSmrgregion from which control is flowing.
221910d565efSmrg@end deftypefn
222010d565efSmrg
222110d565efSmrg@deftypefn {GIMPLE function} int gimple_resx_region (const gresx *g)
222210d565efSmrgReturn the region number for @code{GIMPLE_RESX} @code{G}.
222310d565efSmrg@end deftypefn
222410d565efSmrg
222510d565efSmrg@deftypefn {GIMPLE function} void gimple_resx_set_region (gresx *g, int region)
222610d565efSmrgSet @code{REGION} to be the region number for @code{GIMPLE_RESX} @code{G}.
222710d565efSmrg@end deftypefn
222810d565efSmrg
222910d565efSmrg@node @code{GIMPLE_RETURN}
223010d565efSmrg@subsection @code{GIMPLE_RETURN}
223110d565efSmrg@cindex @code{GIMPLE_RETURN}
223210d565efSmrg
223310d565efSmrg@deftypefn {GIMPLE function} greturn *gimple_build_return (tree retval)
223410d565efSmrgBuild a @code{GIMPLE_RETURN} statement whose return value is retval.
223510d565efSmrg@end deftypefn
223610d565efSmrg
223710d565efSmrg@deftypefn {GIMPLE function} tree gimple_return_retval (const greturn *g)
223810d565efSmrgReturn the return value for @code{GIMPLE_RETURN} @code{G}.
223910d565efSmrg@end deftypefn
224010d565efSmrg
224110d565efSmrg@deftypefn {GIMPLE function} void gimple_return_set_retval (greturn *g, @
224210d565efSmrgtree retval)
224310d565efSmrgSet @code{RETVAL} to be the return value for @code{GIMPLE_RETURN} @code{G}.
224410d565efSmrg@end deftypefn
224510d565efSmrg
224610d565efSmrg@node @code{GIMPLE_SWITCH}
224710d565efSmrg@subsection @code{GIMPLE_SWITCH}
224810d565efSmrg@cindex @code{GIMPLE_SWITCH}
224910d565efSmrg
225010d565efSmrg@deftypefn {GIMPLE function} gswitch *gimple_build_switch (tree index, @
225110d565efSmrgtree default_label, @code{vec}<tree> *args)
225210d565efSmrgBuild a @code{GIMPLE_SWITCH} statement.  @code{INDEX} is the index variable
225310d565efSmrgto switch on, and @code{DEFAULT_LABEL} represents the default label.
225410d565efSmrg@code{ARGS} is a vector of @code{CASE_LABEL_EXPR} trees that contain the
225510d565efSmrgnon-default case labels.  Each label is a tree of code @code{CASE_LABEL_EXPR}.
225610d565efSmrg@end deftypefn
225710d565efSmrg
225810d565efSmrg@deftypefn {GIMPLE function} unsigned gimple_switch_num_labels ( @
225910d565efSmrgconst gswitch *g)
226010d565efSmrgReturn the number of labels associated with the switch statement
226110d565efSmrg@code{G}.
226210d565efSmrg@end deftypefn
226310d565efSmrg
226410d565efSmrg@deftypefn {GIMPLE function} void gimple_switch_set_num_labels (gswitch *g, @
226510d565efSmrgunsigned nlabels)
226610d565efSmrgSet @code{NLABELS} to be the number of labels for the switch statement
226710d565efSmrg@code{G}.
226810d565efSmrg@end deftypefn
226910d565efSmrg
227010d565efSmrg@deftypefn {GIMPLE function} tree gimple_switch_index (const gswitch *g)
227110d565efSmrgReturn the index variable used by the switch statement @code{G}.
227210d565efSmrg@end deftypefn
227310d565efSmrg
227410d565efSmrg@deftypefn {GIMPLE function} void gimple_switch_set_index (gswitch *g, @
227510d565efSmrgtree index)
227610d565efSmrgSet @code{INDEX} to be the index variable for switch statement @code{G}.
227710d565efSmrg@end deftypefn
227810d565efSmrg
227910d565efSmrg@deftypefn {GIMPLE function} tree gimple_switch_label (const gswitch *g, @
228010d565efSmrgunsigned index)
228110d565efSmrgReturn the label numbered @code{INDEX}. The default label is 0, followed
228210d565efSmrgby any labels in a switch statement.
228310d565efSmrg@end deftypefn
228410d565efSmrg
228510d565efSmrg@deftypefn {GIMPLE function} void gimple_switch_set_label (gswitch *g, @
228610d565efSmrgunsigned index, tree label)
228710d565efSmrgSet the label number @code{INDEX} to @code{LABEL}. 0 is always the default
228810d565efSmrglabel.
228910d565efSmrg@end deftypefn
229010d565efSmrg
229110d565efSmrg@deftypefn {GIMPLE function} tree gimple_switch_default_label ( @
229210d565efSmrgconst gswitch *g)
229310d565efSmrgReturn the default label for a switch statement.
229410d565efSmrg@end deftypefn
229510d565efSmrg
229610d565efSmrg@deftypefn {GIMPLE function} void gimple_switch_set_default_label (gswitch *g, @
229710d565efSmrgtree label)
229810d565efSmrgSet the default label for a switch statement.
229910d565efSmrg@end deftypefn
230010d565efSmrg
230110d565efSmrg
230210d565efSmrg@node @code{GIMPLE_TRY}
230310d565efSmrg@subsection @code{GIMPLE_TRY}
230410d565efSmrg@cindex @code{GIMPLE_TRY}
230510d565efSmrg
230610d565efSmrg@deftypefn {GIMPLE function} gtry *gimple_build_try (gimple_seq eval, @
230710d565efSmrggimple_seq cleanup, unsigned int kind)
230810d565efSmrgBuild a @code{GIMPLE_TRY} statement.  @code{EVAL} is a sequence with the
230910d565efSmrgexpression to evaluate.  @code{CLEANUP} is a sequence of statements to
231010d565efSmrgrun at clean-up time.  @code{KIND} is the enumeration value
231110d565efSmrg@code{GIMPLE_TRY_CATCH} if this statement denotes a try/catch construct
231210d565efSmrgor @code{GIMPLE_TRY_FINALLY} if this statement denotes a try/finally
231310d565efSmrgconstruct.
231410d565efSmrg@end deftypefn
231510d565efSmrg
231610d565efSmrg@deftypefn {GIMPLE function} {enum gimple_try_flags} gimple_try_kind (gimple g)
231710d565efSmrgReturn the kind of try block represented by @code{GIMPLE_TRY} @code{G}. This is
231810d565efSmrgeither @code{GIMPLE_TRY_CATCH} or @code{GIMPLE_TRY_FINALLY}.
231910d565efSmrg@end deftypefn
232010d565efSmrg
232110d565efSmrg@deftypefn {GIMPLE function} bool gimple_try_catch_is_cleanup (gimple g)
232210d565efSmrgReturn the @code{GIMPLE_TRY_CATCH_IS_CLEANUP} flag.
232310d565efSmrg@end deftypefn
232410d565efSmrg
232510d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_try_eval (gimple g)
232610d565efSmrgReturn the sequence of statements used as the body for @code{GIMPLE_TRY}
232710d565efSmrg@code{G}.
232810d565efSmrg@end deftypefn
232910d565efSmrg
233010d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_try_cleanup (gimple g)
233110d565efSmrgReturn the sequence of statements used as the cleanup body for
233210d565efSmrg@code{GIMPLE_TRY} @code{G}.
233310d565efSmrg@end deftypefn
233410d565efSmrg
233510d565efSmrg@deftypefn {GIMPLE function} void gimple_try_set_catch_is_cleanup (gimple g, @
233610d565efSmrgbool catch_is_cleanup)
233710d565efSmrgSet the @code{GIMPLE_TRY_CATCH_IS_CLEANUP} flag.
233810d565efSmrg@end deftypefn
233910d565efSmrg
234010d565efSmrg@deftypefn {GIMPLE function} void gimple_try_set_eval (gtry *g, gimple_seq eval)
234110d565efSmrgSet @code{EVAL} to be the sequence of statements to use as the body for
234210d565efSmrg@code{GIMPLE_TRY} @code{G}.
234310d565efSmrg@end deftypefn
234410d565efSmrg
234510d565efSmrg@deftypefn {GIMPLE function} void gimple_try_set_cleanup (gtry *g, @
234610d565efSmrggimple_seq cleanup)
234710d565efSmrgSet @code{CLEANUP} to be the sequence of statements to use as the
234810d565efSmrgcleanup body for @code{GIMPLE_TRY} @code{G}.
234910d565efSmrg@end deftypefn
235010d565efSmrg
235110d565efSmrg@node @code{GIMPLE_WITH_CLEANUP_EXPR}
235210d565efSmrg@subsection @code{GIMPLE_WITH_CLEANUP_EXPR}
235310d565efSmrg@cindex @code{GIMPLE_WITH_CLEANUP_EXPR}
235410d565efSmrg
235510d565efSmrg@deftypefn {GIMPLE function} gimple gimple_build_wce (gimple_seq cleanup)
235610d565efSmrgBuild a @code{GIMPLE_WITH_CLEANUP_EXPR} statement.  @code{CLEANUP} is the
235710d565efSmrgclean-up expression.
235810d565efSmrg@end deftypefn
235910d565efSmrg
236010d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_wce_cleanup (gimple g)
236110d565efSmrgReturn the cleanup sequence for cleanup statement @code{G}.
236210d565efSmrg@end deftypefn
236310d565efSmrg
236410d565efSmrg@deftypefn {GIMPLE function} void gimple_wce_set_cleanup (gimple g, gimple_seq cleanup)
236510d565efSmrgSet @code{CLEANUP} to be the cleanup sequence for @code{G}.
236610d565efSmrg@end deftypefn
236710d565efSmrg
236810d565efSmrg@deftypefn {GIMPLE function} bool gimple_wce_cleanup_eh_only (gimple g)
236910d565efSmrgReturn the @code{CLEANUP_EH_ONLY} flag for a @code{WCE} tuple.
237010d565efSmrg@end deftypefn
237110d565efSmrg
237210d565efSmrg@deftypefn {GIMPLE function} void gimple_wce_set_cleanup_eh_only (gimple g, bool eh_only_p)
237310d565efSmrgSet the @code{CLEANUP_EH_ONLY} flag for a @code{WCE} tuple.
237410d565efSmrg@end deftypefn
237510d565efSmrg
237610d565efSmrg
237710d565efSmrg@node GIMPLE sequences
237810d565efSmrg@section GIMPLE sequences
237910d565efSmrg@cindex GIMPLE sequences
238010d565efSmrg
238110d565efSmrgGIMPLE sequences are the tuple equivalent of @code{STATEMENT_LIST}'s
238210d565efSmrgused in @code{GENERIC}.  They are used to chain statements together, and
238310d565efSmrgwhen used in conjunction with sequence iterators, provide a
238410d565efSmrgframework for iterating through statements.
238510d565efSmrg
238610d565efSmrgGIMPLE sequences are of type struct @code{gimple_sequence}, but are more
238710d565efSmrgcommonly passed by reference to functions dealing with sequences.
238810d565efSmrgThe type for a sequence pointer is @code{gimple_seq} which is the same
238910d565efSmrgas struct @code{gimple_sequence} *.  When declaring a local sequence,
239010d565efSmrgyou can define a local variable of type struct @code{gimple_sequence}.
239110d565efSmrgWhen declaring a sequence allocated on the garbage collected
239210d565efSmrgheap, use the function @code{gimple_seq_alloc} documented below.
239310d565efSmrg
239410d565efSmrgThere are convenience functions for iterating through sequences
239510d565efSmrgin the section entitled Sequence Iterators.
239610d565efSmrg
239710d565efSmrgBelow is a list of functions to manipulate and query sequences.
239810d565efSmrg
239910d565efSmrg@deftypefn {GIMPLE function} void gimple_seq_add_stmt (gimple_seq *seq, gimple g)
240010d565efSmrgLink a gimple statement to the end of the sequence *@code{SEQ} if @code{G} is
240110d565efSmrgnot @code{NULL}.  If *@code{SEQ} is @code{NULL}, allocate a sequence before linking.
240210d565efSmrg@end deftypefn
240310d565efSmrg
240410d565efSmrg@deftypefn {GIMPLE function} void gimple_seq_add_seq (gimple_seq *dest, gimple_seq src)
240510d565efSmrgAppend sequence @code{SRC} to the end of sequence *@code{DEST} if @code{SRC} is not
240610d565efSmrg@code{NULL}.  If *@code{DEST} is @code{NULL}, allocate a new sequence before
240710d565efSmrgappending.
240810d565efSmrg@end deftypefn
240910d565efSmrg
241010d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_seq_deep_copy (gimple_seq src)
241110d565efSmrgPerform a deep copy of sequence @code{SRC} and return the result.
241210d565efSmrg@end deftypefn
241310d565efSmrg
241410d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_seq_reverse (gimple_seq seq)
241510d565efSmrgReverse the order of the statements in the sequence @code{SEQ}.  Return
241610d565efSmrg@code{SEQ}.
241710d565efSmrg@end deftypefn
241810d565efSmrg
241910d565efSmrg@deftypefn {GIMPLE function} gimple gimple_seq_first (gimple_seq s)
242010d565efSmrgReturn the first statement in sequence @code{S}.
242110d565efSmrg@end deftypefn
242210d565efSmrg
242310d565efSmrg@deftypefn {GIMPLE function} gimple gimple_seq_last (gimple_seq s)
242410d565efSmrgReturn the last statement in sequence @code{S}.
242510d565efSmrg@end deftypefn
242610d565efSmrg
242710d565efSmrg@deftypefn {GIMPLE function} void gimple_seq_set_last (gimple_seq s, gimple last)
242810d565efSmrgSet the last statement in sequence @code{S} to the statement in @code{LAST}.
242910d565efSmrg@end deftypefn
243010d565efSmrg
243110d565efSmrg@deftypefn {GIMPLE function} void gimple_seq_set_first (gimple_seq s, gimple first)
243210d565efSmrgSet the first statement in sequence @code{S} to the statement in @code{FIRST}.
243310d565efSmrg@end deftypefn
243410d565efSmrg
243510d565efSmrg@deftypefn {GIMPLE function} void gimple_seq_init (gimple_seq s)
243610d565efSmrgInitialize sequence @code{S} to an empty sequence.
243710d565efSmrg@end deftypefn
243810d565efSmrg
243910d565efSmrg@deftypefn {GIMPLE function} gimple_seq gimple_seq_alloc (void)
244010d565efSmrgAllocate a new sequence in the garbage collected store and return
244110d565efSmrgit.
244210d565efSmrg@end deftypefn
244310d565efSmrg
244410d565efSmrg@deftypefn {GIMPLE function} void gimple_seq_copy (gimple_seq dest, gimple_seq src)
244510d565efSmrgCopy the sequence @code{SRC} into the sequence @code{DEST}.
244610d565efSmrg@end deftypefn
244710d565efSmrg
244810d565efSmrg@deftypefn {GIMPLE function} bool gimple_seq_empty_p (gimple_seq s)
244910d565efSmrgReturn true if the sequence @code{S} is empty.
245010d565efSmrg@end deftypefn
245110d565efSmrg
245210d565efSmrg@deftypefn {GIMPLE function} gimple_seq bb_seq (basic_block bb)
245310d565efSmrgReturns the sequence of statements in @code{BB}.
245410d565efSmrg@end deftypefn
245510d565efSmrg
245610d565efSmrg@deftypefn {GIMPLE function} void set_bb_seq (basic_block bb, gimple_seq seq)
245710d565efSmrgSets the sequence of statements in @code{BB} to @code{SEQ}.
245810d565efSmrg@end deftypefn
245910d565efSmrg
246010d565efSmrg@deftypefn {GIMPLE function} bool gimple_seq_singleton_p (gimple_seq seq)
246110d565efSmrgDetermine whether @code{SEQ} contains exactly one statement.
246210d565efSmrg@end deftypefn
246310d565efSmrg
246410d565efSmrg@node Sequence iterators
246510d565efSmrg@section Sequence iterators
246610d565efSmrg@cindex Sequence iterators
246710d565efSmrg
246810d565efSmrgSequence iterators are convenience constructs for iterating
246910d565efSmrgthrough statements in a sequence.  Given a sequence @code{SEQ}, here is
247010d565efSmrga typical use of gimple sequence iterators:
247110d565efSmrg
247210d565efSmrg@smallexample
247310d565efSmrggimple_stmt_iterator gsi;
247410d565efSmrg
247510d565efSmrgfor (gsi = gsi_start (seq); !gsi_end_p (gsi); gsi_next (&gsi))
247610d565efSmrg  @{
247710d565efSmrg    gimple g = gsi_stmt (gsi);
247810d565efSmrg    /* Do something with gimple statement @code{G}.  */
247910d565efSmrg  @}
248010d565efSmrg@end smallexample
248110d565efSmrg
248210d565efSmrgBackward iterations are possible:
248310d565efSmrg
248410d565efSmrg@smallexample
248510d565efSmrg        for (gsi = gsi_last (seq); !gsi_end_p (gsi); gsi_prev (&gsi))
248610d565efSmrg@end smallexample
248710d565efSmrg
248810d565efSmrgForward and backward iterations on basic blocks are possible with
248910d565efSmrg@code{gsi_start_bb} and @code{gsi_last_bb}.
249010d565efSmrg
249110d565efSmrgIn the documentation below we sometimes refer to enum
249210d565efSmrg@code{gsi_iterator_update}.  The valid options for this enumeration are:
249310d565efSmrg
249410d565efSmrg@itemize @bullet
249510d565efSmrg@item @code{GSI_NEW_STMT}
249610d565efSmrgOnly valid when a single statement is added.  Move the iterator to it.
249710d565efSmrg
249810d565efSmrg@item @code{GSI_SAME_STMT}
249910d565efSmrgLeave the iterator at the same statement.
250010d565efSmrg
250110d565efSmrg@item @code{GSI_CONTINUE_LINKING}
250210d565efSmrgMove iterator to whatever position is suitable for linking other
250310d565efSmrgstatements in the same direction.
250410d565efSmrg@end itemize
250510d565efSmrg
250610d565efSmrgBelow is a list of the functions used to manipulate and use
250710d565efSmrgstatement iterators.
250810d565efSmrg
250910d565efSmrg@deftypefn {GIMPLE function} gimple_stmt_iterator gsi_start (gimple_seq seq)
251010d565efSmrgReturn a new iterator pointing to the sequence @code{SEQ}'s first
251110d565efSmrgstatement.  If @code{SEQ} is empty, the iterator's basic block is @code{NULL}.
251210d565efSmrgUse @code{gsi_start_bb} instead when the iterator needs to always have
251310d565efSmrgthe correct basic block set.
251410d565efSmrg@end deftypefn
251510d565efSmrg
251610d565efSmrg@deftypefn {GIMPLE function} gimple_stmt_iterator gsi_start_bb (basic_block bb)
251710d565efSmrgReturn a new iterator pointing to the first statement in basic
251810d565efSmrgblock @code{BB}.
251910d565efSmrg@end deftypefn
252010d565efSmrg
252110d565efSmrg@deftypefn {GIMPLE function} gimple_stmt_iterator gsi_last (gimple_seq seq)
252210d565efSmrgReturn a new iterator initially pointing to the last statement of
252310d565efSmrgsequence @code{SEQ}.  If @code{SEQ} is empty, the iterator's basic block is
252410d565efSmrg@code{NULL}.  Use @code{gsi_last_bb} instead when the iterator needs to always
252510d565efSmrghave the correct basic block set.
252610d565efSmrg@end deftypefn
252710d565efSmrg
252810d565efSmrg@deftypefn {GIMPLE function} gimple_stmt_iterator gsi_last_bb (basic_block bb)
252910d565efSmrgReturn a new iterator pointing to the last statement in basic
253010d565efSmrgblock @code{BB}.
253110d565efSmrg@end deftypefn
253210d565efSmrg
253310d565efSmrg@deftypefn {GIMPLE function} bool gsi_end_p (gimple_stmt_iterator i)
253410d565efSmrgReturn @code{TRUE} if at the end of @code{I}.
253510d565efSmrg@end deftypefn
253610d565efSmrg
253710d565efSmrg@deftypefn {GIMPLE function} bool gsi_one_before_end_p (gimple_stmt_iterator i)
253810d565efSmrgReturn @code{TRUE} if we're one statement before the end of @code{I}.
253910d565efSmrg@end deftypefn
254010d565efSmrg
254110d565efSmrg@deftypefn {GIMPLE function} void gsi_next (gimple_stmt_iterator *i)
254210d565efSmrgAdvance the iterator to the next gimple statement.
254310d565efSmrg@end deftypefn
254410d565efSmrg
254510d565efSmrg@deftypefn {GIMPLE function} void gsi_prev (gimple_stmt_iterator *i)
254610d565efSmrgAdvance the iterator to the previous gimple statement.
254710d565efSmrg@end deftypefn
254810d565efSmrg
254910d565efSmrg@deftypefn {GIMPLE function} gimple gsi_stmt (gimple_stmt_iterator i)
255010d565efSmrgReturn the current stmt.
255110d565efSmrg@end deftypefn
255210d565efSmrg
255310d565efSmrg@deftypefn {GIMPLE function} gimple_stmt_iterator gsi_after_labels (basic_block bb)
255410d565efSmrgReturn a block statement iterator that points to the first
255510d565efSmrgnon-label statement in block @code{BB}.
255610d565efSmrg@end deftypefn
255710d565efSmrg
255810d565efSmrg@deftypefn {GIMPLE function} {gimple *} gsi_stmt_ptr (gimple_stmt_iterator *i)
255910d565efSmrgReturn a pointer to the current stmt.
256010d565efSmrg@end deftypefn
256110d565efSmrg
256210d565efSmrg@deftypefn {GIMPLE function} basic_block gsi_bb (gimple_stmt_iterator i)
256310d565efSmrgReturn the basic block associated with this iterator.
256410d565efSmrg@end deftypefn
256510d565efSmrg
256610d565efSmrg@deftypefn {GIMPLE function} gimple_seq gsi_seq (gimple_stmt_iterator i)
256710d565efSmrgReturn the sequence associated with this iterator.
256810d565efSmrg@end deftypefn
256910d565efSmrg
257010d565efSmrg@deftypefn {GIMPLE function} void gsi_remove (gimple_stmt_iterator *i, bool remove_eh_info)
257110d565efSmrgRemove the current stmt from the sequence.  The iterator is
257210d565efSmrgupdated to point to the next statement.  When @code{REMOVE_EH_INFO} is
257310d565efSmrgtrue we remove the statement pointed to by iterator @code{I} from the @code{EH}
257410d565efSmrgtables.  Otherwise we do not modify the @code{EH} tables.  Generally,
257510d565efSmrg@code{REMOVE_EH_INFO} should be true when the statement is going to be
257610d565efSmrgremoved from the @code{IL} and not reinserted elsewhere.
257710d565efSmrg@end deftypefn
257810d565efSmrg
257910d565efSmrg@deftypefn {GIMPLE function} void gsi_link_seq_before (gimple_stmt_iterator *i, gimple_seq seq, enum gsi_iterator_update mode)
258010d565efSmrgLinks the sequence of statements @code{SEQ} before the statement pointed
258110d565efSmrgby iterator @code{I}.  @code{MODE} indicates what to do with the iterator
258210d565efSmrgafter insertion (see @code{enum gsi_iterator_update} above).
258310d565efSmrg@end deftypefn
258410d565efSmrg
258510d565efSmrg@deftypefn {GIMPLE function} void gsi_link_before (gimple_stmt_iterator *i, gimple g, enum gsi_iterator_update mode)
258610d565efSmrgLinks statement @code{G} before the statement pointed-to by iterator @code{I}.
258710d565efSmrgUpdates iterator @code{I} according to @code{MODE}.
258810d565efSmrg@end deftypefn
258910d565efSmrg
259010d565efSmrg@deftypefn {GIMPLE function} void gsi_link_seq_after (gimple_stmt_iterator *i, @
259110d565efSmrggimple_seq seq, enum gsi_iterator_update mode)
259210d565efSmrgLinks sequence @code{SEQ} after the statement pointed-to by iterator @code{I}.
259310d565efSmrg@code{MODE} is as in @code{gsi_insert_after}.
259410d565efSmrg@end deftypefn
259510d565efSmrg
259610d565efSmrg@deftypefn {GIMPLE function} void gsi_link_after (gimple_stmt_iterator *i, @
259710d565efSmrggimple g, enum gsi_iterator_update mode)
259810d565efSmrgLinks statement @code{G} after the statement pointed-to by iterator @code{I}.
259910d565efSmrg@code{MODE} is as in @code{gsi_insert_after}.
260010d565efSmrg@end deftypefn
260110d565efSmrg
260210d565efSmrg@deftypefn {GIMPLE function} gimple_seq gsi_split_seq_after (gimple_stmt_iterator i)
260310d565efSmrgMove all statements in the sequence after @code{I} to a new sequence.
260410d565efSmrgReturn this new sequence.
260510d565efSmrg@end deftypefn
260610d565efSmrg
260710d565efSmrg@deftypefn {GIMPLE function} gimple_seq gsi_split_seq_before (gimple_stmt_iterator *i)
260810d565efSmrgMove all statements in the sequence before @code{I} to a new sequence.
260910d565efSmrgReturn this new sequence.
261010d565efSmrg@end deftypefn
261110d565efSmrg
261210d565efSmrg@deftypefn {GIMPLE function} void gsi_replace (gimple_stmt_iterator *i, @
261310d565efSmrggimple stmt, bool update_eh_info)
261410d565efSmrgReplace the statement pointed-to by @code{I} to @code{STMT}.  If @code{UPDATE_EH_INFO}
261510d565efSmrgis true, the exception handling information of the original
261610d565efSmrgstatement is moved to the new statement.
261710d565efSmrg@end deftypefn
261810d565efSmrg
261910d565efSmrg@deftypefn {GIMPLE function} void gsi_insert_before (gimple_stmt_iterator *i, @
262010d565efSmrggimple stmt, enum gsi_iterator_update mode)
262110d565efSmrgInsert statement @code{STMT} before the statement pointed-to by iterator
262210d565efSmrg@code{I}, update @code{STMT}'s basic block and scan it for new operands.  @code{MODE}
262310d565efSmrgspecifies how to update iterator @code{I} after insertion (see enum
262410d565efSmrg@code{gsi_iterator_update}).
262510d565efSmrg@end deftypefn
262610d565efSmrg
262710d565efSmrg@deftypefn {GIMPLE function} void gsi_insert_seq_before (gimple_stmt_iterator *i, @
262810d565efSmrggimple_seq seq, enum gsi_iterator_update mode)
262910d565efSmrgLike @code{gsi_insert_before}, but for all the statements in @code{SEQ}.
263010d565efSmrg@end deftypefn
263110d565efSmrg
263210d565efSmrg@deftypefn {GIMPLE function} void gsi_insert_after (gimple_stmt_iterator *i, @
263310d565efSmrggimple stmt, enum gsi_iterator_update mode)
263410d565efSmrgInsert statement @code{STMT} after the statement pointed-to by iterator
263510d565efSmrg@code{I}, update @code{STMT}'s basic block and scan it for new operands.  @code{MODE}
263610d565efSmrgspecifies how to update iterator @code{I} after insertion (see enum
263710d565efSmrg@code{gsi_iterator_update}).
263810d565efSmrg@end deftypefn
263910d565efSmrg
264010d565efSmrg@deftypefn {GIMPLE function} void gsi_insert_seq_after (gimple_stmt_iterator *i, @
264110d565efSmrggimple_seq seq, enum gsi_iterator_update mode)
264210d565efSmrgLike @code{gsi_insert_after}, but for all the statements in @code{SEQ}.
264310d565efSmrg@end deftypefn
264410d565efSmrg
264510d565efSmrg@deftypefn {GIMPLE function} gimple_stmt_iterator gsi_for_stmt (gimple stmt)
264610d565efSmrgFinds iterator for @code{STMT}.
264710d565efSmrg@end deftypefn
264810d565efSmrg
264910d565efSmrg@deftypefn {GIMPLE function} void gsi_move_after (gimple_stmt_iterator *from, @
265010d565efSmrggimple_stmt_iterator *to)
265110d565efSmrgMove the statement at @code{FROM} so it comes right after the statement
265210d565efSmrgat @code{TO}.
265310d565efSmrg@end deftypefn
265410d565efSmrg
265510d565efSmrg@deftypefn {GIMPLE function} void gsi_move_before (gimple_stmt_iterator *from, @
265610d565efSmrggimple_stmt_iterator *to)
265710d565efSmrgMove the statement at @code{FROM} so it comes right before the statement
265810d565efSmrgat @code{TO}.
265910d565efSmrg@end deftypefn
266010d565efSmrg
266110d565efSmrg@deftypefn {GIMPLE function} void gsi_move_to_bb_end (gimple_stmt_iterator *from, @
266210d565efSmrgbasic_block bb)
266310d565efSmrgMove the statement at @code{FROM} to the end of basic block @code{BB}.
266410d565efSmrg@end deftypefn
266510d565efSmrg
266610d565efSmrg@deftypefn {GIMPLE function} void gsi_insert_on_edge (edge e, gimple stmt)
266710d565efSmrgAdd @code{STMT} to the pending list of edge @code{E}.  No actual insertion is
266810d565efSmrgmade until a call to @code{gsi_commit_edge_inserts}() is made.
266910d565efSmrg@end deftypefn
267010d565efSmrg
267110d565efSmrg@deftypefn {GIMPLE function} void gsi_insert_seq_on_edge (edge e, gimple_seq seq)
267210d565efSmrgAdd the sequence of statements in @code{SEQ} to the pending list of edge
267310d565efSmrg@code{E}.  No actual insertion is made until a call to
267410d565efSmrg@code{gsi_commit_edge_inserts}() is made.
267510d565efSmrg@end deftypefn
267610d565efSmrg
267710d565efSmrg@deftypefn {GIMPLE function} basic_block gsi_insert_on_edge_immediate (edge e, gimple stmt)
267810d565efSmrgSimilar to @code{gsi_insert_on_edge}+@code{gsi_commit_edge_inserts}.  If a new
267910d565efSmrgblock has to be created, it is returned.
268010d565efSmrg@end deftypefn
268110d565efSmrg
268210d565efSmrg@deftypefn {GIMPLE function} void gsi_commit_one_edge_insert (edge e, basic_block *new_bb)
268310d565efSmrgCommit insertions pending at edge @code{E}.  If a new block is created,
268410d565efSmrgset @code{NEW_BB} to this block, otherwise set it to @code{NULL}.
268510d565efSmrg@end deftypefn
268610d565efSmrg
268710d565efSmrg@deftypefn {GIMPLE function} void gsi_commit_edge_inserts (void)
268810d565efSmrgThis routine will commit all pending edge insertions, creating
268910d565efSmrgany new basic blocks which are necessary.
269010d565efSmrg@end deftypefn
269110d565efSmrg
269210d565efSmrg
269310d565efSmrg@node Adding a new GIMPLE statement code
269410d565efSmrg@section Adding a new GIMPLE statement code
269510d565efSmrg@cindex Adding a new GIMPLE statement code
269610d565efSmrg
269710d565efSmrgThe first step in adding a new GIMPLE statement code, is
269810d565efSmrgmodifying the file @code{gimple.def}, which contains all the GIMPLE
269910d565efSmrgcodes.  Then you must add a corresponding gimple subclass
270010d565efSmrglocated in @code{gimple.h}.  This in turn, will require you to add a
270110d565efSmrgcorresponding @code{GTY} tag in @code{gsstruct.def}, and code to handle
270210d565efSmrgthis tag in @code{gss_for_code} which is located in @code{gimple.c}.
270310d565efSmrg
270410d565efSmrgIn order for the garbage collector to know the size of the
270510d565efSmrgstructure you created in @code{gimple.h}, you need to add a case to
270610d565efSmrghandle your new GIMPLE statement in @code{gimple_size} which is located
270710d565efSmrgin @code{gimple.c}.
270810d565efSmrg
270910d565efSmrgYou will probably want to create a function to build the new
271010d565efSmrggimple statement in @code{gimple.c}.  The function should be called
271110d565efSmrg@code{gimple_build_@var{new-tuple-name}}, and should return the new tuple
271210d565efSmrgas a pointer to the appropriate gimple subclass.
271310d565efSmrg
271410d565efSmrgIf your new statement requires accessors for any members or
271510d565efSmrgoperands it may have, put simple inline accessors in
271610d565efSmrg@code{gimple.h} and any non-trivial accessors in @code{gimple.c} with a
271710d565efSmrgcorresponding prototype in @code{gimple.h}.
271810d565efSmrg
271910d565efSmrgYou should add the new statement subclass to the class hierarchy diagram
272010d565efSmrgin @code{gimple.texi}.
272110d565efSmrg
272210d565efSmrg
272310d565efSmrg@node Statement and operand traversals
272410d565efSmrg@section Statement and operand traversals
272510d565efSmrg@cindex Statement and operand traversals
272610d565efSmrg
272710d565efSmrgThere are two functions available for walking statements and
272810d565efSmrgsequences: @code{walk_gimple_stmt} and @code{walk_gimple_seq},
272910d565efSmrgaccordingly, and a third function for walking the operands in a
273010d565efSmrgstatement: @code{walk_gimple_op}.
273110d565efSmrg
273210d565efSmrg@deftypefn {GIMPLE function} tree walk_gimple_stmt (gimple_stmt_iterator *gsi, @
273310d565efSmrg  walk_stmt_fn callback_stmt, walk_tree_fn callback_op, struct walk_stmt_info *wi)
273410d565efSmrgThis function is used to walk the current statement in @code{GSI},
273510d565efSmrgoptionally using traversal state stored in @code{WI}.  If @code{WI} is @code{NULL}, no
273610d565efSmrgstate is kept during the traversal.
273710d565efSmrg
273810d565efSmrgThe callback @code{CALLBACK_STMT} is called.  If @code{CALLBACK_STMT} returns
273910d565efSmrgtrue, it means that the callback function has handled all the
274010d565efSmrgoperands of the statement and it is not necessary to walk its
274110d565efSmrgoperands.
274210d565efSmrg
274310d565efSmrgIf @code{CALLBACK_STMT} is @code{NULL} or it returns false, @code{CALLBACK_OP} is
274410d565efSmrgcalled on each operand of the statement via @code{walk_gimple_op}.  If
274510d565efSmrg@code{walk_gimple_op} returns non-@code{NULL} for any operand, the remaining
274610d565efSmrgoperands are not scanned.
274710d565efSmrg
274810d565efSmrgThe return value is that returned by the last call to
274910d565efSmrg@code{walk_gimple_op}, or @code{NULL_TREE} if no @code{CALLBACK_OP} is specified.
275010d565efSmrg@end deftypefn
275110d565efSmrg
275210d565efSmrg
275310d565efSmrg@deftypefn {GIMPLE function} tree walk_gimple_op (gimple stmt, @
275410d565efSmrg  walk_tree_fn callback_op, struct walk_stmt_info *wi)
275510d565efSmrgUse this function to walk the operands of statement @code{STMT}.  Every
275610d565efSmrgoperand is walked via @code{walk_tree} with optional state information
275710d565efSmrgin @code{WI}.
275810d565efSmrg
275910d565efSmrg@code{CALLBACK_OP} is called on each operand of @code{STMT} via @code{walk_tree}.
276010d565efSmrgAdditional parameters to @code{walk_tree} must be stored in @code{WI}.  For
276110d565efSmrgeach operand @code{OP}, @code{walk_tree} is called as:
276210d565efSmrg
276310d565efSmrg@smallexample
276410d565efSmrgwalk_tree (&@code{OP}, @code{CALLBACK_OP}, @code{WI}, @code{PSET})
276510d565efSmrg@end smallexample
276610d565efSmrg
276710d565efSmrgIf @code{CALLBACK_OP} returns non-@code{NULL} for an operand, the remaining
276810d565efSmrgoperands are not scanned.  The return value is that returned by
276910d565efSmrgthe last call to @code{walk_tree}, or @code{NULL_TREE} if no @code{CALLBACK_OP} is
277010d565efSmrgspecified.
277110d565efSmrg@end deftypefn
277210d565efSmrg
277310d565efSmrg
277410d565efSmrg@deftypefn {GIMPLE function} tree walk_gimple_seq (gimple_seq seq, @
277510d565efSmrg  walk_stmt_fn callback_stmt, walk_tree_fn callback_op, struct walk_stmt_info *wi)
277610d565efSmrgThis function walks all the statements in the sequence @code{SEQ}
277710d565efSmrgcalling @code{walk_gimple_stmt} on each one.  @code{WI} is as in
277810d565efSmrg@code{walk_gimple_stmt}.  If @code{walk_gimple_stmt} returns non-@code{NULL}, the walk
277910d565efSmrgis stopped and the value returned.  Otherwise, all the statements
278010d565efSmrgare walked and @code{NULL_TREE} returned.
278110d565efSmrg@end deftypefn
2782