This is the mail archive of the
mailing list for the GCC project.
Re: ifcvt/crossjump patch: Fix PR 42496, 21803
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: Paolo Bonzini <bonzini at gnu dot org>, gcc-patches at gcc dot gnu dot org, Steven Bosscher <stevenb dot gcc at gmail dot com>, Jim Wilson <wilson at codesourcery dot com>
- Date: Tue, 27 Jul 2010 09:44:05 +0200
- Subject: Re: ifcvt/crossjump patch: Fix PR 42496, 21803
- References: <4BB3CCCA.firstname.lastname@example.org> <4C4D903F.email@example.com> <4C4D9264.firstname.lastname@example.org>
> How is this simpler and better than just having a single line calling
> reorder_insns? It seems pointless given that it produces the same
> result, with a lot more effort.
It's the canonical way of doing this kind of transformations these days. The
underlying machinery is supposed to do all the heavy lifting, you just have
to drive it.
In particular, I want to avoid kludges like:
+/* Set to true if we couldn't run an optimization due to stale liveness
+ information; we should run df_analyze to enable more opportunities. */
+static bool block_was_dirty;
@@ -2182,6 +2449,9 @@ try_optimize_cfg (int mode)
&& try_crossjump_bb (mode, EXIT_BLOCK_PTR))
changed = true;
+ if (block_was_dirty)
+ df_analyze ();
that shouldn't be necessary.