This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Revisiting the use of cselib in alias.c for scheduling
On Wed, Jul 21, 2010 at 10:09 PM, Maxim Kuvyrkov <maxim@codesourcery.com> wrote:
> Cselib can /always/ be used during second scheduling pass
Except with the selective scheduler when it works on regions that are
not extended basic blocks, I suppose?
> and on
> single-block regions during the first scheduling pass (after RA sched-rgn
> operates on single-block regions).
>
> Modulo the bugs enabling cselib might surface, the only reason not to enable
> cselib for single-block regions in sched-rgn may be increased compile time.
> ?That requires some benchmarking, but my gut feeling is that the benefits
> would outweigh the compile-time cost.
So something like the following _should_ work? If so, I'll give it a
try on x86*.
Ciao!
Steven
Index: sched-rgn.c
===================================================================
--- sched-rgn.c (revision 162355)
+++ sched-rgn.c (working copy)
@@ -3285,8 +3285,11 @@
rgn_setup_sched_infos (void)
{
if (!sel_sched_p ())
- memcpy (&rgn_sched_deps_info, &rgn_const_sched_deps_info,
- sizeof (rgn_sched_deps_info));
+ {
+ memcpy (&rgn_sched_deps_info, &rgn_const_sched_deps_info,
+ sizeof (rgn_sched_deps_info));
+ rgn_sched_deps_info.use_cselib = reload_completed;
+ }
else
memcpy (&rgn_sched_deps_info, &rgn_const_sel_sched_deps_info,
sizeof (rgn_sched_deps_info));