You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
11KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>GIMPLE_ASSIGN (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="GIMPLE_ASSIGN (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="GIMPLE_ASSIGN (GNU Compiler Collection (GCC) Internals)">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Tuple-specific-accessors.html#Tuple-specific-accessors" rel="up" title="Tuple specific accessors">
  30. <link href="GIMPLE_005fBIND.html#GIMPLE_005fBIND" rel="next" title="GIMPLE_BIND">
  31. <link href="GIMPLE_005fASM.html#GIMPLE_005fASM" rel="prev" title="GIMPLE_ASM">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="GIMPLE_005fASSIGN"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="GIMPLE_005fBIND.html#GIMPLE_005fBIND" accesskey="n" rel="next"><code>GIMPLE_BIND</code></a>, Previous: <a href="GIMPLE_005fASM.html#GIMPLE_005fASM" accesskey="p" rel="prev"><code>GIMPLE_ASM</code></a>, Up: <a href="Tuple-specific-accessors.html#Tuple-specific-accessors" accesskey="u" rel="up">Tuple specific accessors</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="GIMPLE_005fASSIGN-1"></a>
  68. <h4 class="subsection">12.8.2 <code>GIMPLE_ASSIGN</code></h4>
  69. <a name="index-GIMPLE_005fASSIGN"></a>
  70. <dl>
  71. <dt><a name="index-_002agimple_005fbuild_005fassign"></a>GIMPLE function: <em>gassign</em> <strong>*gimple_build_assign</strong> <em>(tree lhs, tree rhs)</em></dt>
  72. <dd><p>Build a <code>GIMPLE_ASSIGN</code> statement. The left-hand side is an lvalue
  73. passed in lhs. The right-hand side can be either a unary or
  74. binary tree expression. The expression tree rhs will be
  75. flattened and its operands assigned to the corresponding operand
  76. slots in the new statement. This function is useful when you
  77. already have a tree expression that you want to convert into a
  78. tuple. However, try to avoid building expression trees for the
  79. sole purpose of calling this function. If you already have the
  80. operands in separate trees, it is better to use
  81. <code>gimple_build_assign</code> with <code>enum tree_code</code> argument and separate
  82. arguments for each operand.
  83. </p></dd></dl>
  84. <dl>
  85. <dt><a name="index-_002agimple_005fbuild_005fassign-1"></a>GIMPLE function: <em>gassign</em> <strong>*gimple_build_assign</strong> <em>(tree lhs, enum tree_code subcode, tree op1, tree op2, tree op3)</em></dt>
  86. <dd><p>This function is similar to two operand <code>gimple_build_assign</code>,
  87. but is used to build a <code>GIMPLE_ASSIGN</code> statement when the operands of the
  88. right-hand side of the assignment are already split into
  89. different operands.
  90. </p>
  91. <p>The left-hand side is an lvalue passed in lhs. Subcode is the
  92. <code>tree_code</code> for the right-hand side of the assignment. Op1, op2 and op3
  93. are the operands.
  94. </p></dd></dl>
  95. <dl>
  96. <dt><a name="index-_002agimple_005fbuild_005fassign-2"></a>GIMPLE function: <em>gassign</em> <strong>*gimple_build_assign</strong> <em>(tree lhs, enum tree_code subcode, tree op1, tree op2)</em></dt>
  97. <dd><p>Like the above 5 operand <code>gimple_build_assign</code>, but with the last
  98. argument <code>NULL</code> - this overload should not be used for
  99. <code>GIMPLE_TERNARY_RHS</code> assignments.
  100. </p></dd></dl>
  101. <dl>
  102. <dt><a name="index-_002agimple_005fbuild_005fassign-3"></a>GIMPLE function: <em>gassign</em> <strong>*gimple_build_assign</strong> <em>(tree lhs, enum tree_code subcode, tree op1)</em></dt>
  103. <dd><p>Like the above 4 operand <code>gimple_build_assign</code>, but with the last
  104. argument <code>NULL</code> - this overload should be used only for
  105. <code>GIMPLE_UNARY_RHS</code> and <code>GIMPLE_SINGLE_RHS</code> assignments.
  106. </p></dd></dl>
  107. <dl>
  108. <dt><a name="index-gimplify_005fassign"></a>GIMPLE function: <em>gimple</em> <strong>gimplify_assign</strong> <em>(tree dst, tree src, gimple_seq *seq_p)</em></dt>
  109. <dd><p>Build a new <code>GIMPLE_ASSIGN</code> tuple and append it to the end of
  110. <code>*SEQ_P</code>.
  111. </p></dd></dl>
  112. <p><code>DST</code>/<code>SRC</code> are the destination and source respectively. You can
  113. pass ungimplified trees in <code>DST</code> or <code>SRC</code>, in which
  114. case they will be converted to a gimple operand if necessary.
  115. </p>
  116. <p>This function returns the newly created <code>GIMPLE_ASSIGN</code> tuple.
  117. </p>
  118. <dl>
  119. <dt><a name="index-gimple_005fassign_005frhs_005fcode"></a>GIMPLE function: <em>enum tree_code</em> <strong>gimple_assign_rhs_code</strong> <em>(gimple g)</em></dt>
  120. <dd><p>Return the code of the expression computed on the <code>RHS</code> of
  121. assignment statement <code>G</code>.
  122. </p></dd></dl>
  123. <dl>
  124. <dt><a name="index-gimple_005fassign_005frhs_005fclass"></a>GIMPLE function: <em>enum gimple_rhs_class</em> <strong>gimple_assign_rhs_class</strong> <em>(gimple g)</em></dt>
  125. <dd><p>Return the gimple rhs class of the code for the expression
  126. computed on the rhs of assignment statement <code>G</code>. This will never
  127. return <code>GIMPLE_INVALID_RHS</code>.
  128. </p></dd></dl>
  129. <dl>
  130. <dt><a name="index-gimple_005fassign_005flhs"></a>GIMPLE function: <em>tree</em> <strong>gimple_assign_lhs</strong> <em>(gimple g)</em></dt>
  131. <dd><p>Return the <code>LHS</code> of assignment statement <code>G</code>.
  132. </p></dd></dl>
  133. <dl>
  134. <dt><a name="index-gimple_005fassign_005flhs_005fptr"></a>GIMPLE function: <em>tree *</em> <strong>gimple_assign_lhs_ptr</strong> <em>(gimple g)</em></dt>
  135. <dd><p>Return a pointer to the <code>LHS</code> of assignment statement <code>G</code>.
  136. </p></dd></dl>
  137. <dl>
  138. <dt><a name="index-gimple_005fassign_005frhs1"></a>GIMPLE function: <em>tree</em> <strong>gimple_assign_rhs1</strong> <em>(gimple g)</em></dt>
  139. <dd><p>Return the first operand on the <code>RHS</code> of assignment statement <code>G</code>.
  140. </p></dd></dl>
  141. <dl>
  142. <dt><a name="index-gimple_005fassign_005frhs1_005fptr"></a>GIMPLE function: <em>tree *</em> <strong>gimple_assign_rhs1_ptr</strong> <em>(gimple g)</em></dt>
  143. <dd><p>Return the address of the first operand on the <code>RHS</code> of assignment
  144. statement <code>G</code>.
  145. </p></dd></dl>
  146. <dl>
  147. <dt><a name="index-gimple_005fassign_005frhs2"></a>GIMPLE function: <em>tree</em> <strong>gimple_assign_rhs2</strong> <em>(gimple g)</em></dt>
  148. <dd><p>Return the second operand on the <code>RHS</code> of assignment statement <code>G</code>.
  149. </p></dd></dl>
  150. <dl>
  151. <dt><a name="index-gimple_005fassign_005frhs2_005fptr"></a>GIMPLE function: <em>tree *</em> <strong>gimple_assign_rhs2_ptr</strong> <em>(gimple g)</em></dt>
  152. <dd><p>Return the address of the second operand on the <code>RHS</code> of assignment
  153. statement <code>G</code>.
  154. </p></dd></dl>
  155. <dl>
  156. <dt><a name="index-gimple_005fassign_005frhs3"></a>GIMPLE function: <em>tree</em> <strong>gimple_assign_rhs3</strong> <em>(gimple g)</em></dt>
  157. <dd><p>Return the third operand on the <code>RHS</code> of assignment statement <code>G</code>.
  158. </p></dd></dl>
  159. <dl>
  160. <dt><a name="index-gimple_005fassign_005frhs3_005fptr"></a>GIMPLE function: <em>tree *</em> <strong>gimple_assign_rhs3_ptr</strong> <em>(gimple g)</em></dt>
  161. <dd><p>Return the address of the third operand on the <code>RHS</code> of assignment
  162. statement <code>G</code>.
  163. </p></dd></dl>
  164. <dl>
  165. <dt><a name="index-gimple_005fassign_005fset_005flhs"></a>GIMPLE function: <em>void</em> <strong>gimple_assign_set_lhs</strong> <em>(gimple g, tree lhs)</em></dt>
  166. <dd><p>Set <code>LHS</code> to be the <code>LHS</code> operand of assignment statement <code>G</code>.
  167. </p></dd></dl>
  168. <dl>
  169. <dt><a name="index-gimple_005fassign_005fset_005frhs1"></a>GIMPLE function: <em>void</em> <strong>gimple_assign_set_rhs1</strong> <em>(gimple g, tree rhs)</em></dt>
  170. <dd><p>Set <code>RHS</code> to be the first operand on the <code>RHS</code> of assignment
  171. statement <code>G</code>.
  172. </p></dd></dl>
  173. <dl>
  174. <dt><a name="index-gimple_005fassign_005fset_005frhs2"></a>GIMPLE function: <em>void</em> <strong>gimple_assign_set_rhs2</strong> <em>(gimple g, tree rhs)</em></dt>
  175. <dd><p>Set <code>RHS</code> to be the second operand on the <code>RHS</code> of assignment
  176. statement <code>G</code>.
  177. </p></dd></dl>
  178. <dl>
  179. <dt><a name="index-gimple_005fassign_005fset_005frhs3"></a>GIMPLE function: <em>void</em> <strong>gimple_assign_set_rhs3</strong> <em>(gimple g, tree rhs)</em></dt>
  180. <dd><p>Set <code>RHS</code> to be the third operand on the <code>RHS</code> of assignment
  181. statement <code>G</code>.
  182. </p></dd></dl>
  183. <dl>
  184. <dt><a name="index-gimple_005fassign_005fcast_005fp-1"></a>GIMPLE function: <em>bool</em> <strong>gimple_assign_cast_p</strong> <em>(const_gimple s)</em></dt>
  185. <dd><p>Return true if <code>S</code> is a type-cast assignment.
  186. </p></dd></dl>
  187. <hr>
  188. <div class="header">
  189. <p>
  190. Next: <a href="GIMPLE_005fBIND.html#GIMPLE_005fBIND" accesskey="n" rel="next"><code>GIMPLE_BIND</code></a>, Previous: <a href="GIMPLE_005fASM.html#GIMPLE_005fASM" accesskey="p" rel="prev"><code>GIMPLE_ASM</code></a>, Up: <a href="Tuple-specific-accessors.html#Tuple-specific-accessors" accesskey="u" rel="up">Tuple specific accessors</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  191. </div>
  192. </body>
  193. </html>