This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR48866] three alternative fixes
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Jun 2012 05:08:20 -0300
- Subject: Re: [PR48866] three alternative fixes
- References: <ory61o1lpf.fsf@livre.localdomain> <ortycc1kdo.fsf@livre.localdomain> <or62onogs9.fsf@livre.localdomain> <orwr5pe8tx.fsf@livre.localdomain>
On Apr 9, 2012, Alexandre Oliva <aoliva@redhat.com> wrote:
> On Jun 2, 2011, Alexandre Oliva <aoliva@redhat.com> wrote:
>> On May 30, 2011, Alexandre Oliva <aoliva@redhat.com> wrote:
>>> On May 30, 2011, Alexandre Oliva <aoliva@redhat.com> wrote:
>>>> I have 3 different, mutually exclusive patches that fix PR 48866. The
>>>> problem is exponential time while dealing with an expression that
>>>> resulted from a long chain of replaceable insns with memory accesses
>>>> moved past the debug insns referring to their results.
>>>> 1. emit debug temps for replaceable DEFs that end up being referenced in
>>>> debug insns. We already have some code to try to deal with this, but it
>>>> emits the huge expressions we'd rather avoid, and it may create
>>>> unnecessary duplication. This new approach emits a placeholder instead
>>>> of skipping replaceable DEFs altogether, and then, if the DEF is
>>>> referenced in a debug insn (perhaps during the late debug re-expasion of
>>>> some other placeholder), it is expanded. Placeholders that end up not
>>>> being referenced are then throw away.
>>> This is my favorite option, for it's safest: it doesn't change
>>> executable code at all (or should I say it *shouldn't* change it, for I
>>> haven't verified that it doesn't), retaining any register pressure
>>> benefits from TER.
>> This revised and retested version records expansions in an array indexed
>> on SSA version rather than a pointer_map, as suggested by Matz.
> Updated to deal with debug source bind stmts, added an assertion in
> var-tracking to make sure we don't get unexpected kinds of decls in
> VAR_LOCATION insns. Regstrapped on x86_64-linux-gnu and i686-linux-gnu.
> Ok to install?
> for gcc/ChangeLog
> from Alexandre Oliva <aoliva@redhat.com>
> PR debug/48866
> * cfgexpand.c (DEBUG_INSN_TOEXPAND): New.
> (def_expansions): New.
> (def_expansions_init): New.
> (def_expansions_remove_placeholder, def_expansions_fini): New.
> (def_get_expansion_ptr): New.
> (expand_debug_expr): Create debug temps as needed.
> (expand_debug_insn): New, split out of...
> (expand_debug_locations): ... this.
> (gen_emit_debug_insn): New, split out of...
> (expand_gimple_basic_block): ... this. Simplify expansion of
> debug stmts. Emit placeholders for replaceable DEFs, rather
> than debug temps at last non-debug uses.
> (gimple_expand_cfg): Initialize and finalize expansions cache.
> * var-tracking.c (use_type): Check for acceptable var decls in
> var_locations.
Ping? http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00413.html
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer