public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PR48866] three alternative fixes
@ 2011-05-30 13:25 Alexandre Oliva
  2011-05-30 13:34 ` Alexandre Oliva
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alexandre Oliva @ 2011-05-30 13:25 UTC (permalink / raw)
  To: gcc-patches

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.

2. emit placeholders for replaceable DEFs and, when the DEFs are
expanded at their point of use, emit the expansion next to the
placeholder, rather than at the current stream.  The result of the
expansion is saved and used in debug insns that reference the
replaceable DEF.  If the result is forced into a REG shortly thereafter,
the code resulting from this is also emitted next to the placeholder,
and the saved expansion is updated.  If the USE is expanded before the
DEF, the insn stream resulting from the expansion is saved and emitted
at the point of the DEF.

3. expand dominators before dominated blocks, so that DEFs of
replaceable SSA names are expanded before their uses.  Expand them when
they're encountered, but not requiring a REG as a result.  Save the RTL
expression that results from the expansion for use in debug insns and at
the non-debug use.

I'll post each patch with further details in separate follow-up e-mails.

-- 
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-06-13  8:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-30 13:25 [PR48866] three alternative fixes Alexandre Oliva
2011-05-30 13:34 ` Alexandre Oliva
2011-06-03  1:21   ` Alexandre Oliva
2012-04-09  6:08     ` Alexandre Oliva
2012-06-13  8:09       ` Alexandre Oliva
2011-05-30 14:30 ` Alexandre Oliva
2011-06-03  1:28   ` Alexandre Oliva
2011-06-03  1:37   ` Alexandre Oliva
2011-05-30 14:55 ` Alexandre Oliva
2011-05-30 15:35   ` Michael Matz
2011-06-01 22:31     ` Alexandre Oliva
2011-06-03  1:34   ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).