DMD - Windows

Manu turkeyman at gmail.com
Mon Jan 9 07:51:24 PST 2012


On 9 January 2012 15:27, Trass3r <un at known.com> wrote:

> static this() seems to be a problem. Unless there's powerful
>> whole-program-optimisation, how can it strip out any data that might be
>> initialised/touched in static this()?
>>
> It probably can't.


I'm sure it's possible, but it would need some pretty powerful global
expression analysis.
Ie, if data initialised in static this() is only touched in one function
lets say, and that function is never referenced, then it should surely be
able to safely eliminate that function and associated data?

Why wouldn't dead code be eliminated effectively already?
>>
> Cause 1 section is created for each module. So if you use just 1 function
> the whole module is pulled in.
>

Why would it pull the whole module if only one function is used? And why
can't a post-link strip process clean it up?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120109/bc9ce382/attachment.html>


More information about the Digitalmars-d mailing list