Patch for AMD Dispatch Scheduler
reza yazdani
yazdani_reza@yahoo.com
Tue Sep 7 22:14:00 GMT 2010
Hello All,
I receive Vladimir's repose and moved the extern's he mentioned to i386.h in my own copy.
Is the rest of the code, mostly in i386.[ch], okay to be checked into the trunk after the above change?
Please let me know.
Thanks,
reza
--- On Tue, 8/31/10, Vladimir Makarov <vmakarov@redhat.com> wrote:
> From: Vladimir Makarov <vmakarov@redhat.com>
> Subject: Re: Patch for AMD Dispatch Scheduler
> To: "reza yazdani" <yazdani_reza@yahoo.com>
> Cc: gcc-patches@gcc.gnu.org, jh@suse.cz, ubizjak@gmail.com, sebpop@gmail.com, "Richard Henderson" <rth@redhat.com>
> Date: Tuesday, August 31, 2010, 1:23 PM
> On 08/24/2010 06:02 PM, reza
> yazdani wrote:
> > Dispatch scheduling is a new BD feature. It is
> composed of two parts: the scheduling part and the alignment
> part.
> >
> > The scheduling part (this patch) arranges instructions
> to maximize the throughput of the hardware dispatcher. It
> makes sure dispatch widow boundaries are roughly observed.
> It is roughly, because the lengths of instructions, in
> number of bytes, are not known at the scheduling time. In
> x86 some instruction lengths may not be known until assembly
> time where information such as branch offsets are computed.
> Scheduling part is called once before register allocation
> and once after register allocation.
> >
> > The alignment part (not in this patch) makes sure
> dispatch widows align at the correct boundaries.
> >
> > Dispatch Scheduling is implemented as an extension to
> Haifa Scheduler pass. Scheduler is programed to follow
> x86-BD dispatching rules during the scheduling.
> >
> > 2 GCC hook functions are used to communicate from the
> machine independent part to the machine dependent parts of
> the scheduler.
> >
> > A new command line flag –mdispatch-scheduler is
> defined. This option sets flag_dispatch_scheduling. To
> perform dispatch scheduling “-march=bdver1” and Haifa
> Scheduling flags must all be selected on the command line.
> >
> > Testing
> > -------
> >
> > Self compile ran with “–mdispatch-scheduling
> -fschedule-insns -fsched-pressure –O2". Dispatch
> scheduling flag was manually set on in the self compile to
> exercise the new code. No new test added for this
> implementation. Make check of i386 tests passes. No
> difference in the number of failures with and without the
> dispatch flag.
> >
> > ChangeLog
> > ---------
> >
> > 2010-08-12 Reza Yazdani<reza.yazdani@amd.com>
> >
> > * tm.texi.in
> (TARGET_SCHED_DISPATCH): New.
> > (TARGET_SCHED_DISPATCH_DO): New.
> > * tm.texi: Regererated.
> > * hooks.c
> (hook_bool_rtx_int_false): New.
> > (hook_void_rtx_int): New.
> > * hooks.h
> (hook_bool_rtx_int_false): New.
> > (hook_void_rtx_int): New.
> > * target.def (dispatch): Defined.
> > (dispatch_do): Defined.
> > * haifa-sched.c
> (ready_remove_first_dispatch): New.
> > (number_in_ready): New.
> > (get_ready_element): New.
> > * sched-init.h
> (get_ready_element): Declared.
> > (number_in_ready): Declared.
> > (debug_ready_dispatch): Declared.
> > (debug_dispatch_window):
> Declared.
> > * i386.opt (-mdispatch-scheduler):
> Declared.
> > (flag_dispatch_scheduling):
> Declared.
> > * i386.c (has_dispatch): New.
> > (get_mem_group): New.
> > (is_cmp): New.
> > (dispatch_violation): New.
> > (is_branch): New.
> > (is_prefetch): New.
> > (init_window): New.
> > (allocate_window): New.
> > (init_dispatch_sched): New.
> > (is_end_basic_block): New.
> > (process_end_window): New.
> > (allocate_next_window): New.
> > (find_constant_1): New.
> > (find_constant): New.
> > (get_num_immediate): New.
> > (has_immediate): New.
> > (get_insn_path): New.
> > (dispatch_group): New.
> > (count_num_restricted): New.
> > (fits_dispatch_window): New.
> > (add_insn_window): New.
> > (add_to_dispatch_window): New.
> > (debug_dispatch_window_file):
> New.
> > (debug_dispatch_window): New.
> > (debug_insn_dispatch_info_file):
> New.
> > (debug_ready_dispatch): New.
> > (do_dispatch): New.
> > (has_dispatch): New.
> >
> > Reza Yazdani
> >
> --------------------------------------------------------------------------
> > Previous communications regarding this patch:
> >
> > There were complains that there are too many hooks in
> my implementation. I changed the interface and only two
> hooks are used in the current implementation. One for
> boolean functions and one for action routines.
> >
> Thanks for addressing this issue. The scheduler part
> (haifa-sched.c) is
> ok. I'd move external declaration
> debug_ready_dispatch and
> debug_dispatch_window from sched-int.h to i386.h because
> they are
> defined there. Sched-int.h for definitions of
> machine-dependent parts
> of insn scheduler.
>
>
More information about the Gcc-patches
mailing list