public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [RFC] Remove -freorder-blocks-and-partition
@ 2011-07-19 22:43 Steven Bosscher
  0 siblings, 0 replies; 21+ messages in thread
From: Steven Bosscher @ 2011-07-19 22:43 UTC (permalink / raw)
  To: Richard Henderson, GCC Mailing List

re. http://gcc.gnu.org/ml/gcc/2011-07/msg00349.html

Richard Henderson wrote:
> After 3 days fighting with this code, I had a bit of a
> cathartic whine on IRC.  I got two votes to just rip the
> whole thing out.

Add one more vote.

> Andrew Pinski points out that the feature could probably be
> equivalently implemented via outlining and function calls
> (I assume well back at the gimple level).

I guess the ipa-split pass could easily be modified to do this, it'd
just need a few new heuristics.

Ciao!
Steven

^ permalink raw reply	[flat|nested] 21+ messages in thread
* [RFC] Remove -freorder-blocks-and-partition
@ 2011-07-19 21:43 Richard Henderson
  2011-07-19 21:56 ` Bernd Schmidt
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Richard Henderson @ 2011-07-19 21:43 UTC (permalink / raw)
  To: gcc

There are a number of problems with this code that affect
its ability to work with any non-x86-like target, that is,
anyone that doesn't define at least HAS_LONG_UNCOND_BRANCH
and possibly HAS_LONG_COND_BRANCH.

We begin, quite sensibly, with pass_partition_blocks which
performs a number of transformations upon the code that,
while the actual code could be better factored, is quite
easy to follow.  Depending on the features of the target,
fallthrus are turned into unconditional jumps, conditional
jumps are split into branch around branch, unconditional
jumps are turned into indirect jumps.

There's nice bits of commentary that say why things are 
implemented this way, including exposing the indirect jumps
to the register allocator.

But after pass_partition_blocks, we run into trouble.  There
are no less than 4 other passes that add *new* crossing jumps
without doing *any* of the subsequent fixups for less capable
targets: pass_outof_cfg_layout_mode, pass_reorder_blocks,
pass_sched2 (ia64 only? it's in code in haifa that looks like
speculative load fixups), and pass_convert_to_eh_region_ranges.

The worst part is that test coverage for this feature is
extremely poor.  It's very difficult to tell if any cleanup
in this area is likely to introduce more bugs than it fixes.

After 3 days fighting with this code, I had a bit of a 
cathartic whine on IRC.  I got two votes to just rip the 
whole thing out.

Andrew Pinski points out that the feature could probably be
equivalently implemented via outlining and function calls
(I assume well back at the gimple level).  At which point we
no longer have cross-segment jump_insns at the rtl level,
which seems like a Really Big Win to me at this point.
Not that I'm volunteering to actually do the work to implement
any such scheme.

Thoughts?


r~

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

end of thread, other threads:[~2011-08-04 16:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19 22:43 [RFC] Remove -freorder-blocks-and-partition Steven Bosscher
  -- strict thread matches above, loose matches on Subject: below --
2011-07-19 21:43 Richard Henderson
2011-07-19 21:56 ` Bernd Schmidt
2011-07-19 22:09   ` Richard Henderson
2011-07-19 23:18     ` Joern Rennecke
2011-07-19 22:28 ` Joern Rennecke
2011-07-19 22:44   ` Richard Henderson
2011-07-25  7:40 ` Xinliang David Li
2011-07-25 11:05   ` Paolo Bonzini
2011-07-25 18:40     ` Xinliang David Li
2011-07-26  1:29     ` Xinliang David Li
2011-07-26  2:33       ` Joern Rennecke
2011-07-27  6:47         ` Xinliang David Li
2011-07-27  8:12           ` Paolo Bonzini
2011-08-03 21:06       ` Jan Hubicka
2011-08-03 21:46         ` Xinliang David Li
2011-08-04 13:32           ` Jan Hubicka
2011-08-04 13:39           ` Jan Hubicka
2011-08-04 16:03             ` Taras Glek
2011-08-03 20:56     ` Jan Hubicka
2011-08-03 20:50 ` Jan Hubicka

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