Dead Code Elimination

Adam Wilson flyboynw at gmail.com
Wed Oct 21 07:24:15 UTC 2026


On Monday, 19 October 2026 at 07:50:10 UTC, Walter Bright wrote:
> On 10/19/2026 12:04 AM, Alexandru Ermicioi wrote:
>> On Monday, 19 October 2026 at 06:46:13 UTC, Walter Bright 
>> wrote:
>>> dmd -c -vasm -O -m32 dead.d:
>> 
>> So is it just 32 bit only?
>
> See https://github.com/dlang/dmd/pull/24074
>
> The alwaysframe is specific to OSX64.
>
> But it does eliminate the dead code due to a DFA optimization 
> called "constant propagation". There's a persistent belief that 
> DMD does not do data flow analysis optimizations.

Has something doesn't mean it works very well. See Rikki's 
example.



More information about the Digitalmars-d mailing list