Walter's talk on D backend
Dibyendu Majumdar
mobile at majumdar.org.uk
Tue Sep 24 22:20:31 UTC 2024
On Tuesday, 24 September 2024 at 06:14:52 UTC, Walter Bright
wrote:
> On 9/23/2024 2:43 AM, claptrap wrote:
>> How do you do dead code elimination in your backend? I mean if
>> you have 3 assignments to X, and say 5 uses of X, how do you
>> determine if any of the assignments are redundant?
>
> By using DFA (Data Flow Analysis).
>
> https://github.com/dlang/dmd/blob/master/compiler/src/dmd/backend/gother.d#L1375
>
> DMD does do all the conventional data flow analysis
> optimizations.
Yes well, SSA is supposed to make it easier to do some
optimizations, but all optimizations are possible without SSA -
using data flow analysis, etc.
But the description provided so far does not show DMD compiler
uses SSA.
More information about the Digitalmars-d
mailing list