https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93385

--- Comment #25 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to rguent...@suse.de from comment #21)
> Btw, I'd much prefer to not first copy the stmts and then remove them.
> Instead the DCE "analysis" can be done on the original IL and stmts
> be "marked" to be elided during copying.  That saves generating
> SSA names and gimple stmts rather than needing to remove them after the
> fact.

It is of course easy to change the patch to do the analysis on the
original and just create a hash_set of statements/SSA_NAMES to not
copy.  I'll do that.

As far as remapping the removed values to ERROR_MARK, I'm not sure.
We'd need to remap some SSA_NAMES of the same DECL differently than
other names (e.g. default-definition of the removed PARM_DECL would
get remapped to ERROR_MARK but not other SSA_NAMES and similarly for
other SSA_NAMES derived from those default-defs) ...and ATM I do not
know to what extent that is a problem.  But I can try.

Reply via email to