<div dir="ltr">I understand. BTW, in GCC compilers this is always inlined (int64 div X)<br>.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 25, 2013 at 12:58 PM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be" target="_blank">jonas.maebe@elis.ugent.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5"><br><div><div>On 25 Sep 2013, at 00:11, August Oktobar wrote:</div>
<br><blockquote type="cite"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:monospace;word-spacing:0px">Why this function cannot be inlined? In some code doing int64</span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:monospace;word-spacing:0px">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:monospace;word-spacing:0px">shifting/dividing math, it is not inlined as other similar compiler</span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:monospace;word-spacing:0px">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:monospace;word-spacing:0px">functions (round, odd etc.)? i am using FPC  2.7.1 32 bit.</span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:monospace;word-spacing:0px">
</blockquote></div><br></div></div><div>It's not inline because it is not declared as "inline". Always inlining it is probably not a good idea, because that function is not really small and hence will code significant code bloat. Adaptive inlining (depending on the number of constant parameters and the resulting code size, or possibly based on profiling information) would be nice, but FPC does not support this.</div>
<span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>Jonas</div></font></span></div><br>_______________________________________________<br>
fpc-devel maillist  -  <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-devel" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a><br>
<br></blockquote></div><br></div>