-Olocaltemps -> -Olocal-temps for consistency; added manpage entry; removed leftover manpage entry for -foverlap-locals; -Olocal-temps moved from -O1 to -O3 due to stability concerns

This commit is contained in:
Wolfgang Bumiller 2012-12-23 21:39:04 +01:00
parent 1ac913877e
commit 6a60368a1b
3 changed files with 10 additions and 6 deletions

View 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
.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
@ -358,6 +354,14 @@ 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.
.SH CONFIG
The configuration file is similar to regular .ini files. Comments
start with hashtags or semicolons, sections are written in square

2
ir.c
View file

@ -2127,7 +2127,7 @@ bool ir_function_allocate_locals(ir_function *self)
for (i = 0; i < vec_size(self->locals); ++i)
{
if (!OPTS_OPTIMIZATION(OPTIM_LOCALTEMPS))
if (!OPTS_OPTIMIZATION(OPTIM_LOCAL_TEMPS))
self->locals[i]->unique_life = true;
if (!function_allocator_alloc(&alloc, self->locals[i]))
goto error;

View file

@ -79,7 +79,7 @@
#ifdef GMQCC_TYPE_OPTIMIZATIONS
GMQCC_DEFINE_FLAG(PEEPHOLE, 1)
GMQCC_DEFINE_FLAG(LOCALTEMPS, 1)
GMQCC_DEFINE_FLAG(LOCAL_TEMPS, 3)
GMQCC_DEFINE_FLAG(TAIL_RECURSION, 1)
GMQCC_DEFINE_FLAG(TAIL_CALLS, 2)
GMQCC_DEFINE_FLAG(OVERLAP_LOCALS, 3)