This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for AMD Dispatch Scheduler


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]