Re: Dead code elimination

henry@zoo.toronto.edu (Henry Spencer)
Tue, 29 Oct 1991 16:31:06 GMT

          From comp.compilers

Related articles
Dead code elimination whatis@ucsd.edu (Steve Boswell) (1991-10-26)
re: Dead code elimination chuck_lins1@gateway.qm.apple.com (Chuck Lins) (1991-10-28)
Re: Dead code elimination henry@zoo.toronto.edu (1991-10-29)
Re: Dead code elimination clyde@hitech.com.au (1991-11-01)
Re: Dead code elimination henry@zoo.toronto.edu (1991-11-05)
Re: Dead code elimination schwartz@roke.cs.psu.edu (1991-11-05)
Re: Dead code elimination dd@mips.com (1991-11-05)
Re: Dead code elimination eggert@twinsun.com (1991-11-06)
Re: Dead Code Elimination preston@dawn.cs.rice.edu (1991-11-07)
[2 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: henry@zoo.toronto.edu (Henry Spencer)
Keywords: C, linker, history
Organization: U of Toronto Zoology
References: 91-10-106 91-10-109
Date: Tue, 29 Oct 1991 16:31:06 GMT

In article 91-10-109 Chuck Lins <chuck_lins1@gateway.qm.apple.com> writes:
>Of course as John mentioned, routines like printf cause extra code to be
>brought in...
>[Son of Soapbox: I've seen Fortran compilers that scan the format statements
>at compile time and emit external references to just the routines needed...


It is worth noting that the *original* C implementation did not bring the
printf floating-point conversions (which were the only really bulky part
in those long-gone days of small, simple code) into the object module
unless the program actually used floating point. This needed minimal
cooperation from the compiler -- emitting a request for a special global
symbol when floating-point code was used -- and careful ordering of
sequentially-searched libraries. It was generally a good bet that a
program which used floating-point numbers was going to print a few.


I fear that the bulk of stuff brought in by printf nowadays is probably
not conversions, but bloated versions of support facilities like the
i/o library. Clever compilers will not help this, because even if you
break printf into pieces, all the pieces will want the same support.
--
Henry Spencer @ U of Toronto Zoology, henry@zoo.toronto.edu utzoo!henry


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.