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

--- Comment #28 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 17 Apr 2020, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93385
> 
> --- Comment #26 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> For debug stmts, it would be best if we could use those
>              DEBUG D#Y s=> parm
>              DEBUG var => D#Y
> added in if (param_body_adjs && MAY_HAVE_DEBUG_BIND_STMTS).
> Though, if we remove already during the copy_bb by not actually creating the
> stmt, I'm afraid that will mean the debug info is lost (debug stmts will be
> reset), unless we for the lhs of to be dced stmts manually create debug
> temporaries and debug stmts when we remap_gimple_stmt those stmts (for
> SSA_NAMEs that are directly (or indirectly!) used in debug stmts).
> If we do what Martin was proposing instead, i.e. copy the stmts and then DCE
> them afterwards, it might work properly (perhaps only if we DCE them in the
> right order).

It's true that copying everything and then DCEing is easier for debug
stmt generation.  I didn't consider this.  That also argues for not
remapping anything to error_mark_node.  Of course this leaves us with
no automagic verification if we really DCEd everything required
(esp. his handling of call arguments looks expensive and odd to me).

I'm also not sure how the machinery is helping the __builtin_constant_p
inline predication issue.

Reply via email to