This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix debug info for modified parameter


On Tue, Nov 12, 2013 at 10:30 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> Hmm, at -O0 we should be able to coalesce all SSA names of a
>> DECL.  So in theory the following should work:
>
> Yes, the attached patch introduces no regressions in the testsuite.  How
> robust is that though?  Do we need some checking for it?

I think we rely on it elsewhere, like in coalesce_ssa_name ()
(even though we use MUST_COALESCE_COST - 1 which means we'll
not ICE if we are not able to coalesce).

Changing the coalesce cost to MUST_COALESCE_COST for
PARM_DECLs and RESULT_DECLs should add the required
checking (we'll ICE if we cannot honor that coalescing request).
Note that the code also has a !DECL_IGNORED_P check, so
eventually the expansion code change should restrict itself to
that as well.

But the patch is ok, you can followup with the coalesce cost change
and the !DECL_IGNORED_P checking (if you are not confident enough it
works as-is).

Thanks,
Richard.

>
>         * cfgexpand.c (expand_used_vars): Allocate space for partitions based
>         on PARM_DECLs or RESULT_DECLs only when optimization is enabled.
>         * tree-outof-ssa.c (remove_ssa_form): Record which partitions contain
>         a default def only when optimization is enabled.
>         (finish_out_of_ssa): Adjust.
>
>
> --
> Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]