This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix debug info for modified parameter
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 13 Nov 2013 10:51:08 +0100
- Subject: Re: [patch] Fix debug info for modified parameter
- Authentication-results: sourceware.org; auth=none
- References: <4469508 dot vHvxoD4oqs at polaris> <CAFiYyc2TE4bMcxVLFsRLjrpUmNazo=Up-wEG4BpXY2CkFKnfkw at mail dot gmail dot com> <2240585 dot 9X5lD7ePko at polaris>
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