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,PR43478] preserve dying REGs in debug temps


On Mon, May 03, 2010 at 09:39:10AM +0200, Steven Bosscher wrote:
> On Mon, May 3, 2010 at 9:33 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
> > This patch implements this plan. ?It works, and it bootstraps
> > successfully on x86_64-linux-gnu, but (as kind of expected) it doesn't
> > completely fix the issue exposed by the testcase in the PR, because the
> > value is really no longer available at the point the variable is bound
> > to it. ?Nevertheless, the patch may improve many other cases in which we
> > generate incomplete debug information because of unnecessary debug insn
> > resets in DF.
> 
> > +  /* ??? Take mode from REG note?  */
> > +  TREE_TYPE (ddecl) = lang_hooks.types.type_for_mode (GET_MODE (reg), 1);
> 
> This alone, using lang hooks this deep down in the language
> independent part of the compiler, should be enough reason to reject
> this patch.

The same langhook is used pretty much in many other places deep down in
language independent parts of the compiler (look at many places in the
vectorizer, or dojump.c, ...).  AFAIK we don't have a middle end function
that would perform something similar, only for integer types we could
perhaps use build_nonstandard_integer_type for the bitsize of the mode,
but nothing comparable for float modes, fixed mode, etc.

Until we have something like that, IMHO the langhook should be used in this
case, when there is a middle-end counterpart, middle-end should be changed
to use that.

	Jakub


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