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.

220 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_CALL (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="GIMPLE_CALL (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="GIMPLE_CALL (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_005fCATCH.html#GIMPLE_005fCATCH" rel="next" title="GIMPLE_CATCH">
  31. <link href="GIMPLE_005fBIND.html#GIMPLE_005fBIND" rel="prev" title="GIMPLE_BIND">
  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_005fCALL"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="GIMPLE_005fCATCH.html#GIMPLE_005fCATCH" accesskey="n" rel="next"><code>GIMPLE_CATCH</code></a>, Previous: <a href="GIMPLE_005fBIND.html#GIMPLE_005fBIND" accesskey="p" rel="prev"><code>GIMPLE_BIND</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_005fCALL-1"></a>
  68. <h4 class="subsection">12.8.4 <code>GIMPLE_CALL</code></h4>
  69. <a name="index-GIMPLE_005fCALL"></a>
  70. <dl>
  71. <dt><a name="index-_002agimple_005fbuild_005fcall"></a>GIMPLE function: <em>gcall</em> <strong>*gimple_build_call</strong> <em>(tree fn, unsigned nargs, ...)</em></dt>
  72. <dd><p>Build a <code>GIMPLE_CALL</code> statement to function <code>FN</code>. The argument <code>FN</code>
  73. must be either a <code>FUNCTION_DECL</code> or a gimple call address as
  74. determined by <code>is_gimple_call_addr</code>. <code>NARGS</code> are the number of
  75. arguments. The rest of the arguments follow the argument <code>NARGS</code>,
  76. and must be trees that are valid as rvalues in gimple (i.e., each
  77. operand is validated with <code>is_gimple_operand</code>).
  78. </p></dd></dl>
  79. <dl>
  80. <dt><a name="index-_002agimple_005fbuild_005fcall_005ffrom_005ftree"></a>GIMPLE function: <em>gcall</em> <strong>*gimple_build_call_from_tree</strong> <em>(tree call_expr, tree fnptrtype)</em></dt>
  81. <dd><p>Build a <code>GIMPLE_CALL</code> from a <code>CALL_EXPR</code> node. The arguments
  82. and the function are taken from the expression directly. The type of the
  83. <code>GIMPLE_CALL</code> is set from the second parameter passed by a caller.
  84. This routine assumes that <code>call_expr</code> is already in GIMPLE form.
  85. That is, its operands are GIMPLE values and the function call needs no further
  86. simplification. All the call flags in <code>call_expr</code> are copied over
  87. to the new <code>GIMPLE_CALL</code>.
  88. </p></dd></dl>
  89. <dl>
  90. <dt><a name="index-_002agimple_005fbuild_005fcall_005fvec"></a>GIMPLE function: <em>gcall</em> <strong>*gimple_build_call_vec</strong> <em>(tree fn, <code>vec&lt;tree&gt;</code> args)</em></dt>
  91. <dd><p>Identical to <code>gimple_build_call</code> but the arguments are stored in a
  92. <code>vec&lt;tree&gt;</code>.
  93. </p></dd></dl>
  94. <dl>
  95. <dt><a name="index-gimple_005fcall_005flhs"></a>GIMPLE function: <em>tree</em> <strong>gimple_call_lhs</strong> <em>(gimple g)</em></dt>
  96. <dd><p>Return the <code>LHS</code> of call statement <code>G</code>.
  97. </p></dd></dl>
  98. <dl>
  99. <dt><a name="index-gimple_005fcall_005flhs_005fptr"></a>GIMPLE function: <em>tree *</em> <strong>gimple_call_lhs_ptr</strong> <em>(gimple g)</em></dt>
  100. <dd><p>Return a pointer to the <code>LHS</code> of call statement <code>G</code>.
  101. </p></dd></dl>
  102. <dl>
  103. <dt><a name="index-gimple_005fcall_005fset_005flhs"></a>GIMPLE function: <em>void</em> <strong>gimple_call_set_lhs</strong> <em>(gimple g, tree lhs)</em></dt>
  104. <dd><p>Set <code>LHS</code> to be the <code>LHS</code> operand of call statement <code>G</code>.
  105. </p></dd></dl>
  106. <dl>
  107. <dt><a name="index-gimple_005fcall_005ffn"></a>GIMPLE function: <em>tree</em> <strong>gimple_call_fn</strong> <em>(gimple g)</em></dt>
  108. <dd><p>Return the tree node representing the function called by call
  109. statement <code>G</code>.
  110. </p></dd></dl>
  111. <dl>
  112. <dt><a name="index-gimple_005fcall_005fset_005ffn"></a>GIMPLE function: <em>void</em> <strong>gimple_call_set_fn</strong> <em>(gcall *g, tree fn)</em></dt>
  113. <dd><p>Set <code>FN</code> to be the function called by call statement <code>G</code>. This has
  114. to be a gimple value specifying the address of the called
  115. function.
  116. </p></dd></dl>
  117. <dl>
  118. <dt><a name="index-gimple_005fcall_005ffndecl"></a>GIMPLE function: <em>tree</em> <strong>gimple_call_fndecl</strong> <em>(gimple g)</em></dt>
  119. <dd><p>If a given <code>GIMPLE_CALL</code>&rsquo;s callee is a <code>FUNCTION_DECL</code>, return it.
  120. Otherwise return <code>NULL</code>. This function is analogous to
  121. <code>get_callee_fndecl</code> in <code>GENERIC</code>.
  122. </p></dd></dl>
  123. <dl>
  124. <dt><a name="index-gimple_005fcall_005fset_005ffndecl"></a>GIMPLE function: <em>tree</em> <strong>gimple_call_set_fndecl</strong> <em>(gimple g, tree fndecl)</em></dt>
  125. <dd><p>Set the called function to <code>FNDECL</code>.
  126. </p></dd></dl>
  127. <dl>
  128. <dt><a name="index-gimple_005fcall_005freturn_005ftype"></a>GIMPLE function: <em>tree</em> <strong>gimple_call_return_type</strong> <em>(const gcall *g)</em></dt>
  129. <dd><p>Return the type returned by call statement <code>G</code>.
  130. </p></dd></dl>
  131. <dl>
  132. <dt><a name="index-gimple_005fcall_005fchain"></a>GIMPLE function: <em>tree</em> <strong>gimple_call_chain</strong> <em>(gimple g)</em></dt>
  133. <dd><p>Return the static chain for call statement <code>G</code>.
  134. </p></dd></dl>
  135. <dl>
  136. <dt><a name="index-gimple_005fcall_005fset_005fchain"></a>GIMPLE function: <em>void</em> <strong>gimple_call_set_chain</strong> <em>(gcall *g, tree chain)</em></dt>
  137. <dd><p>Set <code>CHAIN</code> to be the static chain for call statement <code>G</code>.
  138. </p></dd></dl>
  139. <dl>
  140. <dt><a name="index-gimple_005fcall_005fnum_005fargs"></a>GIMPLE function: <em>unsigned</em> <strong>gimple_call_num_args</strong> <em>(gimple g)</em></dt>
  141. <dd><p>Return the number of arguments used by call statement <code>G</code>.
  142. </p></dd></dl>
  143. <dl>
  144. <dt><a name="index-gimple_005fcall_005farg"></a>GIMPLE function: <em>tree</em> <strong>gimple_call_arg</strong> <em>(gimple g, unsigned index)</em></dt>
  145. <dd><p>Return the argument at position <code>INDEX</code> for call statement <code>G</code>. The
  146. first argument is 0.
  147. </p></dd></dl>
  148. <dl>
  149. <dt><a name="index-gimple_005fcall_005farg_005fptr"></a>GIMPLE function: <em>tree *</em> <strong>gimple_call_arg_ptr</strong> <em>(gimple g, unsigned index)</em></dt>
  150. <dd><p>Return a pointer to the argument at position <code>INDEX</code> for call
  151. statement <code>G</code>.
  152. </p></dd></dl>
  153. <dl>
  154. <dt><a name="index-gimple_005fcall_005fset_005farg"></a>GIMPLE function: <em>void</em> <strong>gimple_call_set_arg</strong> <em>(gimple g, unsigned index, tree arg)</em></dt>
  155. <dd><p>Set <code>ARG</code> to be the argument at position <code>INDEX</code> for call statement
  156. <code>G</code>.
  157. </p></dd></dl>
  158. <dl>
  159. <dt><a name="index-gimple_005fcall_005fset_005ftail"></a>GIMPLE function: <em>void</em> <strong>gimple_call_set_tail</strong> <em>(gcall *s)</em></dt>
  160. <dd><p>Mark call statement <code>S</code> as being a tail call (i.e., a call just
  161. before the exit of a function). These calls are candidate for
  162. tail call optimization.
  163. </p></dd></dl>
  164. <dl>
  165. <dt><a name="index-gimple_005fcall_005ftail_005fp"></a>GIMPLE function: <em>bool</em> <strong>gimple_call_tail_p</strong> <em>(gcall *s)</em></dt>
  166. <dd><p>Return true if <code>GIMPLE_CALL</code> <code>S</code> is marked as a tail call.
  167. </p></dd></dl>
  168. <dl>
  169. <dt><a name="index-gimple_005fcall_005fnoreturn_005fp"></a>GIMPLE function: <em>bool</em> <strong>gimple_call_noreturn_p</strong> <em>(gimple s)</em></dt>
  170. <dd><p>Return true if <code>S</code> is a noreturn call.
  171. </p></dd></dl>
  172. <dl>
  173. <dt><a name="index-gimple_005fcall_005fcopy_005fskip_005fargs"></a>GIMPLE function: <em>gimple</em> <strong>gimple_call_copy_skip_args</strong> <em>(gcall *stmt, bitmap args_to_skip)</em></dt>
  174. <dd><p>Build a <code>GIMPLE_CALL</code> identical to <code>STMT</code> but skipping the arguments
  175. in the positions marked by the set <code>ARGS_TO_SKIP</code>.
  176. </p></dd></dl>
  177. <hr>
  178. <div class="header">
  179. <p>
  180. Next: <a href="GIMPLE_005fCATCH.html#GIMPLE_005fCATCH" accesskey="n" rel="next"><code>GIMPLE_CATCH</code></a>, Previous: <a href="GIMPLE_005fBIND.html#GIMPLE_005fBIND" accesskey="p" rel="prev"><code>GIMPLE_BIND</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>
  181. </div>
  182. </body>
  183. </html>