]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - doc/gmqcc.1
-Ostrip-constant-names
[xonotic/gmqcc.git] / doc / gmqcc.1
index 8ccc6e08203b825f8177d9269e7cbf252317b5d2..8c30d8d8da05cc57ffa5b92e702b30a03ef84b58 100644 (file)
@@ -244,10 +244,6 @@ token inside the enclosing attribute-brackets. This may change when
 the actual attribute syntax is better defined.
 .SH COMPILE FLAGS
 .TP
 the actual attribute syntax is better defined.
 .SH COMPILE FLAGS
 .TP
-.B -foverlap-locals
-Allow local variables to overlap with each other if they don't
-interfer with each other. (Not implemented right now)
-.TP
 .B -fdarkplaces-string-table-bug
 Add some additional characters to the string table in order to
 compensate for a wrong boundcheck in some specific version of the
 .B -fdarkplaces-string-table-bug
 Add some additional characters to the string table in order to
 compensate for a wrong boundcheck in some specific version of the
@@ -331,6 +327,46 @@ effectively causes the unary not in strings to use NOT_F instead.
 An empty string is considered to be false everywhere. This means loops
 and if statements which depend on a string will perform a NOT_S
 instruction on the string before using it.
 An empty string is considered to be false everywhere. This means loops
 and if statements which depend on a string will perform a NOT_S
 instruction on the string before using it.
+.TP
+.B -futf8
+Enable utf8 characters. This allows utf-8 encoded character constants,
+and escape sequence codepoints in the valid utf-8 range. Effectively
+enabling escape sequences like '\\{x2211}'.
+.SH OPTIMIZATIONS
+.TP
+.B -Opeephole
+Some general peephole optimizations. For instance the code `a = b + c`
+typically generates 2 instructions, an ADD and a STORE. This
+optimization removes the STORE and lets the ADD write directly into A.
+.TP
+.B -Otail-recursion
+Tail recursive function calls will be turned into loops to avoid the
+overhead of the CALL and RETURN instructions.
+.TP
+.B -Ooverlap-locals
+Make all functions which use neither local arrays nor have locals
+which are seen as possibly uninitialized use the same local section.
+This should be pretty safe compared to other compilers which do not
+check for uninitialized values properly. The problem is that there's
+QC code out there which really doesn't initialize some values. This is
+fine as long as this kind of optimization isn't used, but also, only
+as long as the functions cannot be called in a recursive manner. Since
+it's hard to know whether or not an array is actually fully
+initialized, especially when initializing it via a loop, we assume
+functions with arrays to be too dangerous for this optimization.
+.TP
+.B -Olocal-temps
+This promotes locally declared variables to "temps". Meaning when a
+temporary result of an operation has to be stored somewhere, a local
+variable which is not 'alive' at that point can be used to keep the
+result. This can reduce the size of the global section.
+This will not have declared variables overlap, even if it was
+possible.
+.TP
+.B -Ostrip-constant-names
+Don't generate defs for immediate values or even declared constants.
+Meaning variables which are implicitly constant or qualified as such
+using the 'const' keyword.
 .SH CONFIG
 The configuration file is similar to regular .ini files. Comments
 start with hashtags or semicolons, sections are written in square
 .SH CONFIG
 The configuration file is similar to regular .ini files. Comments
 start with hashtags or semicolons, sections are written in square