From: Oliver Schmidt Date: Mon, 3 Apr 2017 21:20:26 +0000 (+0200) Subject: So far the built-in inlining of several known standard function was always (!) enable... X-Git-Tag: V2.16~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=02daf9f8b5c1ae2267561ee05ce67b2d0393c12d;p=cc65 So far the built-in inlining of several known standard function was always (!) enabled and the option -Os enabled additional, potentially unsafe inlining of some of those functions. There were two aspects of this behavior that were considered undesirable: - Although the safe inlining is in general desirable it should only be enabled if asked for it - like any other optimization. - The option name -Os implies that it is a safe option, the potentially unsafe inlining should have a more explicit name. So now: - The option -Os enables the safe inlining. - The new option --eagerly-inline-funcs enables the potentially unsafe inlining (including the safe inlining). Additionally was added: - The option --inline-stdfuncs that does like -Os enable the safe inlining but doesn't enable optimizations. - The pragma inline-stdfuncs that works identical to --inline-stdfuncs. - The pragma allow-eager-inline that enables the potentially unsafe inlining but doesn't include the safe inlining. That means that by itself it only marks code as safe for potentially unsafe inlining but doesn't actually enable any inlining. --- diff --git a/doc/cc65.sgml b/doc/cc65.sgml index 2a0fa0260..9322a2d44 100644 --- a/doc/cc65.sgml +++ b/doc/cc65.sgml @@ -58,7 +58,7 @@ Short options: -O Optimize code -Oi Optimize code, inline more code -Or Enable register variables - -Os Inline some known functions + -Os Inline some standard functions -T Include source as comment -V Print the compiler version number -W warning[,...] Suppress warnings @@ -88,9 +88,11 @@ Long options: --debug-opt name Debug optimization steps --dep-target target Use this dependency target --disable-opt name Disable an optimization step + --eagerly-inline-funcs Eagerly inline some known functions --enable-opt name Enable an optimization step --help Help (this text) --include-dir dir Set an include directory search path + --inline-stdfuncs Inline some standard functions --list-opt-steps List all optimizer steps and exit --list-warnings List available warning types for -W --local-strings Emit string literals immediately @@ -219,11 +221,53 @@ Here is a description of all the command line options: symbols in a special section in the object file. +