GIMPLE_005fASSIGN.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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-2017 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 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>GNU Compiler Collection (GCC) Internals: GIMPLE_ASSIGN</title>
  20. <meta name="description" content="GNU Compiler Collection (GCC) Internals: GIMPLE_ASSIGN">
  21. <meta name="keywords" content="GNU Compiler Collection (GCC) Internals: GIMPLE_ASSIGN">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  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.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  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.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="GIMPLE_005fASSIGN"></a>
  63. <div class="header">
  64. <p>
  65. 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>
  66. </div>
  67. <hr>
  68. <a name="GIMPLE_005fASSIGN-1"></a>
  69. <h4 class="subsection">11.8.2 <code>GIMPLE_ASSIGN</code></h4>
  70. <a name="index-GIMPLE_005fASSIGN"></a>
  71. <dl>
  72. <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>
  73. <dd><p>Build a <code>GIMPLE_ASSIGN</code> statement. The left-hand side is an lvalue
  74. passed in lhs. The right-hand side can be either a unary or
  75. binary tree expression. The expression tree rhs will be
  76. flattened and its operands assigned to the corresponding operand
  77. slots in the new statement. This function is useful when you
  78. already have a tree expression that you want to convert into a
  79. tuple. However, try to avoid building expression trees for the
  80. sole purpose of calling this function. If you already have the
  81. operands in separate trees, it is better to use
  82. <code>gimple_build_assign</code> with <code>enum tree_code</code> argument and separate
  83. arguments for each operand.
  84. </p></dd></dl>
  85. <dl>
  86. <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>
  87. <dd><p>This function is similar to two operand <code>gimple_build_assign</code>,
  88. but is used to build a <code>GIMPLE_ASSIGN</code> statement when the operands of the
  89. right-hand side of the assignment are already split into
  90. different operands.
  91. </p>
  92. <p>The left-hand side is an lvalue passed in lhs. Subcode is the
  93. <code>tree_code</code> for the right-hand side of the assignment. Op1, op2 and op3
  94. are the operands.
  95. </p></dd></dl>
  96. <dl>
  97. <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>
  98. <dd><p>Like the above 5 operand <code>gimple_build_assign</code>, but with the last
  99. argument <code>NULL</code> - this overload should not be used for
  100. <code>GIMPLE_TERNARY_RHS</code> assignments.
  101. </p></dd></dl>
  102. <dl>
  103. <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>
  104. <dd><p>Like the above 4 operand <code>gimple_build_assign</code>, but with the last
  105. argument <code>NULL</code> - this overload should be used only for
  106. <code>GIMPLE_UNARY_RHS</code> and <code>GIMPLE_SINGLE_RHS</code> assignments.
  107. </p></dd></dl>
  108. <dl>
  109. <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>
  110. <dd><p>Build a new <code>GIMPLE_ASSIGN</code> tuple and append it to the end of
  111. <code>*SEQ_P</code>.
  112. </p></dd></dl>
  113. <p><code>DST</code>/<code>SRC</code> are the destination and source respectively. You can
  114. pass ungimplified trees in <code>DST</code> or <code>SRC</code>, in which
  115. case they will be converted to a gimple operand if necessary.
  116. </p>
  117. <p>This function returns the newly created <code>GIMPLE_ASSIGN</code> tuple.
  118. </p>
  119. <dl>
  120. <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>
  121. <dd><p>Return the code of the expression computed on the <code>RHS</code> of
  122. assignment statement <code>G</code>.
  123. </p></dd></dl>
  124. <dl>
  125. <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>
  126. <dd><p>Return the gimple rhs class of the code for the expression
  127. computed on the rhs of assignment statement <code>G</code>. This will never
  128. return <code>GIMPLE_INVALID_RHS</code>.
  129. </p></dd></dl>
  130. <dl>
  131. <dt><a name="index-gimple_005fassign_005flhs"></a>GIMPLE function: <em>tree</em> <strong>gimple_assign_lhs</strong> <em>(gimple g)</em></dt>
  132. <dd><p>Return the <code>LHS</code> of assignment statement <code>G</code>.
  133. </p></dd></dl>
  134. <dl>
  135. <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>
  136. <dd><p>Return a pointer to the <code>LHS</code> of assignment statement <code>G</code>.
  137. </p></dd></dl>
  138. <dl>
  139. <dt><a name="index-gimple_005fassign_005frhs1"></a>GIMPLE function: <em>tree</em> <strong>gimple_assign_rhs1</strong> <em>(gimple g)</em></dt>
  140. <dd><p>Return the first operand on the <code>RHS</code> of assignment statement <code>G</code>.
  141. </p></dd></dl>
  142. <dl>
  143. <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>
  144. <dd><p>Return the address of the first operand on the <code>RHS</code> of assignment
  145. statement <code>G</code>.
  146. </p></dd></dl>
  147. <dl>
  148. <dt><a name="index-gimple_005fassign_005frhs2"></a>GIMPLE function: <em>tree</em> <strong>gimple_assign_rhs2</strong> <em>(gimple g)</em></dt>
  149. <dd><p>Return the second operand on the <code>RHS</code> of assignment statement <code>G</code>.
  150. </p></dd></dl>
  151. <dl>
  152. <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>
  153. <dd><p>Return the address of the second operand on the <code>RHS</code> of assignment
  154. statement <code>G</code>.
  155. </p></dd></dl>
  156. <dl>
  157. <dt><a name="index-gimple_005fassign_005frhs3"></a>GIMPLE function: <em>tree</em> <strong>gimple_assign_rhs3</strong> <em>(gimple g)</em></dt>
  158. <dd><p>Return the third operand on the <code>RHS</code> of assignment statement <code>G</code>.
  159. </p></dd></dl>
  160. <dl>
  161. <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>
  162. <dd><p>Return the address of the third operand on the <code>RHS</code> of assignment
  163. statement <code>G</code>.
  164. </p></dd></dl>
  165. <dl>
  166. <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>
  167. <dd><p>Set <code>LHS</code> to be the <code>LHS</code> operand of assignment statement <code>G</code>.
  168. </p></dd></dl>
  169. <dl>
  170. <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>
  171. <dd><p>Set <code>RHS</code> to be the first operand on the <code>RHS</code> of assignment
  172. statement <code>G</code>.
  173. </p></dd></dl>
  174. <dl>
  175. <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>
  176. <dd><p>Set <code>RHS</code> to be the second operand on the <code>RHS</code> of assignment
  177. statement <code>G</code>.
  178. </p></dd></dl>
  179. <dl>
  180. <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>
  181. <dd><p>Set <code>RHS</code> to be the third operand on the <code>RHS</code> of assignment
  182. statement <code>G</code>.
  183. </p></dd></dl>
  184. <dl>
  185. <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>
  186. <dd><p>Return true if <code>S</code> is a type-cast assignment.
  187. </p></dd></dl>
  188. <hr>
  189. <div class="header">
  190. <p>
  191. 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>
  192. </div>
  193. </body>
  194. </html>