Fill more delay slots in conditional returns

Message ID
State New
Headers show

Commit Message

Steven Bosscher April 9, 2013, 4:31 p.m.
On Tue, Apr 9, 2013 at 6:15 PM, Eric Botcazou wrote:
>> If you wanted to get ambitious, rewriting reorg.c to compute and use
>> dependency links to drive its candidate selection instead of the insane
>> tracking code it uses would be a huge step forward, both in terms of
>> cleanliness.  It'd also help compile-time performance; we do a lot of
>> work to track resources that would be totally unnecessary.
> Yes, I agree that it's quite convoluted but, as Steven already said, rewriting
> it to use a more modern framework is hard because of SEQUENCEs and, frankly, I
> have neither the real incentive nor the time to start such an endeavor.

I've actually picked up the idea again. This is just last week-end's
work so don't expect much of it yet ;-)

But I'm near the point where I want to see if I can actually make it
fill some slots from the containing basic block and pushing it through
verify_flow_info somehow.

After that, the hard parts: branches and annulling.



Index: reorg.c
--- reorg.c     (revision 197610)
+++ reorg.c     (working copy)
@@ -3847,6 +3847,10 @@ 
   free (uid_to_ruid);
   crtl->dbr_scheduled_p = true;
+#include "sched-deps-graph.c"
+#include "sched-dbr.c"
 #endif /* DELAY_SLOTS */

 static bool
@@ -3865,6 +3869,7 @@ 
 rest_of_handle_delay_slots (void)
+  fill_delay_slots ();
   dbr_schedule (get_insns ());
   return 0;