From: ceriel Date: Thu, 16 Jun 1988 09:41:51 +0000 (+0000) Subject: Added option to indicate that whole program is offered X-Git-Tag: release-5-5~3196 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=dea600f9bf87969c9d2f5e594a826559e4417686;p=ack.git Added option to indicate that whole program is offered --- diff --git a/util/ego/il/il.c b/util/ego/il/il.c index 4d0ddd11a..cd6e42b38 100644 --- a/util/ego/il/il.c +++ b/util/ego/il/il.c @@ -24,6 +24,7 @@ #include "../share/go.h" int calnr; +int complete_program; calcnt_p cchead; /* call-count info of current proc */ STATIC short space = 0; @@ -277,10 +278,15 @@ Sdiagnostics() il_flags(p) char *p; { - if (*p++ == 's') { + switch(*p++) { + case 's': while (*p != '\0') { space = 10*space +*p++ -'0'; } + break; + case 'a': + complete_program = 1; + break; } } diff --git a/util/ego/il/il.h b/util/ego/il/il.h index 083848d9f..95da6dfea 100644 --- a/util/ego/il/il.h +++ b/util/ego/il/il.h @@ -88,6 +88,7 @@ struct calcnt { +extern int complete_program; extern int calnr; extern calcnt_p cchead; /* calcnt info of current proc */ diff --git a/util/ego/il/il2_aux.c b/util/ego/il/il2_aux.c index 0fbec72e8..824552125 100644 --- a/util/ego/il/il2_aux.c +++ b/util/ego/il/il2_aux.c @@ -323,7 +323,7 @@ STATIC bool is_dispensable(callee,ccf) */ if ((--callee->P_NRCALLED) == 0 && - (callee->p_flags1 & PF_EXTERNAL) == 0 && + (complete_program || (callee->p_flags1 & PF_EXTERNAL) == 0) && (callee->p_flags1 & PF_LPI) == 0) { DISPENSABLE(callee); OUTTRACE("procedure %d can be removed",callee->p_id); @@ -466,7 +466,8 @@ STATIC singles(cals) } else { if (c->cl_proc->P_NRCALLED == 1 && !IS_CHANGED(c->cl_proc) && - (c->cl_proc->p_flags1 & PF_EXTERNAL) == 0 && + (complete_program || + (c->cl_proc->p_flags1 & PF_EXTERNAL) == 0) && (c->cl_proc->p_flags1 & PF_LPI) == 0) { c->cl_proc->P_NRCALLED = 0; SELECTED(c);