core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_inline_depth.htm
author Deepak Modgil <Deepak.Modgil@Nokia.com>
Fri, 03 Apr 2009 23:33:03 +0100
changeset 0 fb279309251b
child 1641 2b3996fc09a1
permissions -rw-r--r--
DP tools release version Revision: 200912

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="LASTUPDATED" content="06/17/05 11:09:43" />
    <title>inline_depth</title>
	<link rel="StyleSheet" href="../../book.css" type="text/css"/>
  </head>

<body>
<h3>inline_depth</h3>
<p>  Controls how many passes are used to expand inline function calls.  </p>
<h5>Syntax</h5>
  <p class="code">#pragma inline_depth(n)<br />
  #pragma inline_depth(smart)</p>
  <h5>Parameters</h5>
  <p class="code">n</p>
  <blockquote>
    <p> Sets the number of passes used to expand inline function calls. The number n is an integer from 0 to 1024 or the smart specifier. It also represents the distance allowed in the call chain from the last function up. For example, if d is the total depth of a call chain, then functions below (d-n) are inlined if they do not exceed the following size settings:</p>
    <p class="code">#pragma inline_max_size(n)<br />
    #pragma inline_max_total_size(n)</p>
    <p>The first pragma sets the maximum function size to be considered for inlining; the second sets the maximum size to which a function is allowed to grow after the functions it calls are inlined. Here, n is the number of statements, operands, and operators in the function, which turns out to be roughly twice the number of instructions generated by the function. However, this number can vary from function to function. For the inline_max_size pragma, the default value of n is 256; for the pragma <a href="p_inline_max_total_size.htm">inline_max_total_size</a>, the default value of n is 10000.</p>
  </blockquote>
  <p class="code">smart</p>
  <blockquote>
    <p>The smart specifier is the default mode, with four passes where the passes 2-4 are limited to small inline functions. All inlineable functions are expanded if inline_depth is set to 1-1024.<br />
    </p>
  </blockquote>
  <h5>Targets</h5>
  All platforms.<br />
  <h5>Remarks</h5>
  The pragmas <a href="p_dont_inline.htm">dont_inline</a> and <a href="p_always_inline.htm">always_inline</a> override this pragma. This pragma corresponds to the Inline Depth setting . The default setting is <span class="code">off</span>.
  <p></p>
<div id="footer">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>


</body>
</html>