Mercurial > hg > CbC > CbC_gcc
comparison gcc/doc/rtl.texi @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
36 * Conversions:: Extending, truncating, floating or fixing. | 36 * Conversions:: Extending, truncating, floating or fixing. |
37 * RTL Declarations:: Declaring volatility, constancy, etc. | 37 * RTL Declarations:: Declaring volatility, constancy, etc. |
38 * Side Effects:: Expressions for storing in registers, etc. | 38 * Side Effects:: Expressions for storing in registers, etc. |
39 * Incdec:: Embedded side-effects for autoincrement addressing. | 39 * Incdec:: Embedded side-effects for autoincrement addressing. |
40 * Assembler:: Representing @code{asm} with operands. | 40 * Assembler:: Representing @code{asm} with operands. |
41 * Debug Information:: Expressions representing debugging information. | |
41 * Insns:: Expression types for entire insns. | 42 * Insns:: Expression types for entire insns. |
42 * Calls:: RTL representation of function call insns. | 43 * Calls:: RTL representation of function call insns. |
43 * Sharing:: Some expressions are unique; others *must* be copied. | 44 * Sharing:: Some expressions are unique; others *must* be copied. |
44 * Reading RTL:: Reading textual RTL from a file. | 45 * Reading RTL:: Reading textual RTL from a file. |
45 @end menu | 46 @end menu |
179 and are lvalues (so they can be used for insertion as well). | 180 and are lvalues (so they can be used for insertion as well). |
180 @xref{Bit-Fields}. | 181 @xref{Bit-Fields}. |
181 | 182 |
182 @item RTX_TERNARY | 183 @item RTX_TERNARY |
183 An RTX code for other three input operations. Currently only | 184 An RTX code for other three input operations. Currently only |
184 @code{IF_THEN_ELSE} and @code{VEC_MERGE}. | 185 @code{IF_THEN_ELSE}, @code{VEC_MERGE}, @code{SIGN_EXTRACT}, |
186 @code{ZERO_EXTRACT}, and @code{FMA}. | |
185 | 187 |
186 @item RTX_INSN | 188 @item RTX_INSN |
187 An RTX code for an entire instruction: @code{INSN}, @code{JUMP_INSN}, and | 189 An RTX code for an entire instruction: @code{INSN}, @code{JUMP_INSN}, and |
188 @code{CALL_INSN}. @xref{Insns}. | 190 @code{CALL_INSN}. @xref{Insns}. |
189 | 191 |
1267 @item CCmode | 1269 @item CCmode |
1268 ``Condition Code'' mode represents the value of a condition code, which | 1270 ``Condition Code'' mode represents the value of a condition code, which |
1269 is a machine-specific set of bits used to represent the result of a | 1271 is a machine-specific set of bits used to represent the result of a |
1270 comparison operation. Other machine-specific modes may also be used for | 1272 comparison operation. Other machine-specific modes may also be used for |
1271 the condition code. These modes are not used on machines that use | 1273 the condition code. These modes are not used on machines that use |
1272 @code{cc0} (see @pxref{Condition Code}). | 1274 @code{cc0} (@pxref{Condition Code}). |
1273 | 1275 |
1274 @findex BLKmode | 1276 @findex BLKmode |
1275 @item BLKmode | 1277 @item BLKmode |
1276 ``Block'' mode represents values that are aggregates to which none of | 1278 ``Block'' mode represents values that are aggregates to which none of |
1277 the other modes apply. In RTL, only memory references can have this mode, | 1279 the other modes apply. In RTL, only memory references can have this mode, |
2230 where @var{m} is wider than the modes of @var{x} and @var{y}, which need | 2232 where @var{m} is wider than the modes of @var{x} and @var{y}, which need |
2231 not be the same. | 2233 not be the same. |
2232 | 2234 |
2233 For unsigned widening multiplication, use the same idiom, but with | 2235 For unsigned widening multiplication, use the same idiom, but with |
2234 @code{zero_extend} instead of @code{sign_extend}. | 2236 @code{zero_extend} instead of @code{sign_extend}. |
2237 | |
2238 @findex fma | |
2239 @item (fma:@var{m} @var{x} @var{y} @var{z}) | |
2240 Represents the @code{fma}, @code{fmaf}, and @code{fmal} builtin | |
2241 functions that do a combined multiply of @var{x} and @var{y} and then | |
2242 adding to@var{z} without doing an intermediate rounding step. | |
2235 | 2243 |
2236 @findex div | 2244 @findex div |
2237 @findex ss_div | 2245 @findex ss_div |
2238 @cindex division | 2246 @cindex division |
2239 @cindex signed division | 2247 @cindex signed division |
3283 contains an @code{asm_operands}; all of these share the same assembler | 3291 contains an @code{asm_operands}; all of these share the same assembler |
3284 template and vectors, but each contains the constraint for the respective | 3292 template and vectors, but each contains the constraint for the respective |
3285 output operand. They are also distinguished by the output-operand index | 3293 output operand. They are also distinguished by the output-operand index |
3286 number, which is 0, 1, @dots{} for successive output operands. | 3294 number, which is 0, 1, @dots{} for successive output operands. |
3287 | 3295 |
3296 @node Debug Information | |
3297 @section Variable Location Debug Information in RTL | |
3298 @cindex Variable Location Debug Information in RTL | |
3299 | |
3300 Variable tracking relies on @code{MEM_EXPR} and @code{REG_EXPR} | |
3301 annotations to determine what user variables memory and register | |
3302 references refer to. | |
3303 | |
3304 Variable tracking at assignments uses these notes only when they refer | |
3305 to variables that live at fixed locations (e.g., addressable | |
3306 variables, global non-automatic variables). For variables whose | |
3307 location may vary, it relies on the following types of notes. | |
3308 | |
3309 @table @code | |
3310 @findex var_location | |
3311 @item (var_location:@var{mode} @var{var} @var{exp} @var{stat}) | |
3312 Binds variable @code{var}, a tree, to value @var{exp}, an RTL | |
3313 expression. It appears only in @code{NOTE_INSN_VAR_LOCATION} and | |
3314 @code{DEBUG_INSN}s, with slightly different meanings. @var{mode}, if | |
3315 present, represents the mode of @var{exp}, which is useful if it is a | |
3316 modeless expression. @var{stat} is only meaningful in notes, | |
3317 indicating whether the variable is known to be initialized or | |
3318 uninitialized. | |
3319 | |
3320 @findex debug_expr | |
3321 @item (debug_expr:@var{mode} @var{decl}) | |
3322 Stands for the value bound to the @code{DEBUG_EXPR_DECL} @var{decl}, | |
3323 that points back to it, within value expressions in | |
3324 @code{VAR_LOCATION} nodes. | |
3325 | |
3326 @end table | |
3327 | |
3288 @node Insns | 3328 @node Insns |
3289 @section Insns | 3329 @section Insns |
3290 @cindex insns | 3330 @cindex insns |
3291 | 3331 |
3292 The RTL representation of the code for a function is a doubly-linked | 3332 The RTL representation of the code for a function is a doubly-linked |
3358 is the insn containing the @code{sequence} expression, as is the value | 3398 is the insn containing the @code{sequence} expression, as is the value |
3359 of @code{PREV_INSN (NEXT_INSN (@var{insn}))} if @var{insn} is the last | 3399 of @code{PREV_INSN (NEXT_INSN (@var{insn}))} if @var{insn} is the last |
3360 insn in the @code{sequence} expression. You can use these expressions | 3400 insn in the @code{sequence} expression. You can use these expressions |
3361 to find the containing @code{sequence} expression. | 3401 to find the containing @code{sequence} expression. |
3362 | 3402 |
3363 Every insn has one of the following six expression codes: | 3403 Every insn has one of the following expression codes: |
3364 | 3404 |
3365 @table @code | 3405 @table @code |
3366 @findex insn | 3406 @findex insn |
3367 @item insn | 3407 @item insn |
3368 The expression code @code{insn} is used for instructions that do not jump | 3408 The expression code @code{insn} is used for instructions that do not jump |
3549 @findex NOTE_INSN_FUNCTION_BEG | 3589 @findex NOTE_INSN_FUNCTION_BEG |
3550 @item NOTE_INSN_FUNCTION_BEG | 3590 @item NOTE_INSN_FUNCTION_BEG |
3551 Appears at the start of the function body, after the function | 3591 Appears at the start of the function body, after the function |
3552 prologue. | 3592 prologue. |
3553 | 3593 |
3594 @findex NOTE_INSN_VAR_LOCATION | |
3595 @findex NOTE_VAR_LOCATION | |
3596 @item NOTE_INSN_VAR_LOCATION | |
3597 This note is used to generate variable location debugging information. | |
3598 It indicates that the user variable in its @code{VAR_LOCATION} operand | |
3599 is at the location given in the RTL expression, or holds a value that | |
3600 can be computed by evaluating the RTL expression from that static | |
3601 point in the program up to the next such note for the same user | |
3602 variable. | |
3603 | |
3554 @end table | 3604 @end table |
3555 | 3605 |
3556 These codes are printed symbolically when they appear in debugging dumps. | 3606 These codes are printed symbolically when they appear in debugging dumps. |
3607 | |
3608 @findex debug_insn | |
3609 @findex INSN_VAR_LOCATION | |
3610 @item debug_insn | |
3611 The expression code @code{debug_insn} is used for pseudo-instructions | |
3612 that hold debugging information for variable tracking at assignments | |
3613 (see @option{-fvar-tracking-assignments} option). They are the RTL | |
3614 representation of @code{GIMPLE_DEBUG} statements | |
3615 (@ref{@code{GIMPLE_DEBUG}}), with a @code{VAR_LOCATION} operand that | |
3616 binds a user variable tree to an RTL representation of the | |
3617 @code{value} in the corresponding statement. A @code{DEBUG_EXPR} in | |
3618 it stands for the value bound to the corresponding | |
3619 @code{DEBUG_EXPR_DECL}. | |
3620 | |
3621 Throughout optimization passes, binding information is kept in | |
3622 pseudo-instruction form, so that, unlike notes, it gets the same | |
3623 treatment and adjustments that regular instructions would. It is the | |
3624 variable tracking pass that turns these pseudo-instructions into var | |
3625 location notes, analyzing control flow, value equivalences and changes | |
3626 to registers and memory referenced in value expressions, propagating | |
3627 the values of debug temporaries and determining expressions that can | |
3628 be used to compute the value of each user variable at as many points | |
3629 (ranges, actually) in the program as possible. | |
3630 | |
3631 Unlike @code{NOTE_INSN_VAR_LOCATION}, the value expression in an | |
3632 @code{INSN_VAR_LOCATION} denotes a value at that specific point in the | |
3633 program, rather than an expression that can be evaluated at any later | |
3634 point before an overriding @code{VAR_LOCATION} is encountered. E.g., | |
3635 if a user variable is bound to a @code{REG} and then a subsequent insn | |
3636 modifies the @code{REG}, the note location would keep mapping the user | |
3637 variable to the register across the insn, whereas the insn location | |
3638 would keep the variable bound to the value, so that the variable | |
3639 tracking pass would emit another location note for the variable at the | |
3640 point in which the register is modified. | |
3641 | |
3557 @end table | 3642 @end table |
3558 | 3643 |
3559 @cindex @code{TImode}, in @code{insn} | 3644 @cindex @code{TImode}, in @code{insn} |
3560 @cindex @code{HImode}, in @code{insn} | 3645 @cindex @code{HImode}, in @code{insn} |
3561 @cindex @code{QImode}, in @code{insn} | 3646 @cindex @code{QImode}, in @code{insn} |