1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00

Ignore running removed old optimization steps. Neither list them in help info.

This commit is contained in:
acqn 2020-08-31 06:16:28 +08:00 committed by Oliver Schmidt
parent ae340703f2
commit 761d00b7dc

View File

@ -1029,7 +1029,9 @@ void ListOptSteps (FILE* F)
fprintf (F, "any\n");
for (I = 0; I < OPTFUNC_COUNT; ++I) {
fprintf (F, "%s\n", OptFuncs[I]->Name);
if (OptFuncs[I]->Func != 0) {
fprintf (F, "%s\n", OptFuncs[I]->Name);
}
}
}
@ -1190,10 +1192,10 @@ static unsigned RunOptFunc (CodeSeg* S, OptFunc* F, unsigned Max)
{
unsigned Changes, C;
/* Don't run the function if it is disabled or if it is prohibited by the
/* Don't run the function if it is removed, disabled or prohibited by the
** code size factor
*/
if (F->Disabled || F->CodeSizeFactor > S->CodeSizeFactor) {
if (F->Func == 0 || F->Disabled || F->CodeSizeFactor > S->CodeSizeFactor) {
return 0;
}