| Submitter | reza yazdani |
|---|---|
| Date | Sept. 15, 2010, 10:47 p.m. |
| Message ID | <24776.52129.qm@web33006.mail.mud.yahoo.com> |
| Download | mbox | patch |
| Permalink | /patch/64924/ |
| State | New |
| Headers | show |
Comments
On 09/15/2010 03:47 PM, reza yazdani wrote: > 2010-09-15 Reza Yazdani <reza.yazdani@amd.com> > > * i386.c (min_insn_size): moved. Ok. r~
reza yazdani <yazdani_reza@yahoo.com> writes: > ChangeLog > --------- > > 2010-09-15 Reza Yazdani <reza.yazdani@amd.com> > > * i386.c (min_insn_size): moved. Would you please mention PR bootstrap/45680 in the ChangeLog entry? Thanks. Rainer
Patch
Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 164317) +++ config/i386/i386.c (working copy) @@ -27559,7 +27559,6 @@ x86_function_profiler (FILE *file, int l } } -#ifdef ASM_OUTPUT_MAX_SKIP_PAD /* We don't have exact information about the insn sizes, but we may assume quite safely that we are informed about all 1 byte insns and memory address sizes. This is enough to eliminate unnecessary padding in @@ -27621,6 +27620,8 @@ min_insn_size (rtx insn) return 2; } +#ifdef ASM_OUTPUT_MAX_SKIP_PAD + /* AMD K8 core mispredicts jumps when there are more than 3 jumps in 16 byte window. */
The function min_insn_size is moved out of #ifdef ASM_OUTPUT_MAX_SKIP_PAD. 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-09-15 Reza Yazdani <reza.yazdani@amd.com> * i386.c (min_insn_size): moved. Is it okay to commit to trunk? Reza ------------------------------------------------- --- On Wed, 9/15/10, Richard Henderson <rth@redhat.com> wrote: > From: Richard Henderson <rth@redhat.com> > Subject: Re: Bug bootstrap/45680 > To: "reza yazdani" <yazdani_reza@yahoo.com> > Cc: gcc-patches@gcc.gnu.org, sebastian.pop@amd.com, "ChangpengFang" <Changpeng.Fang@amd.com> > Date: Wednesday, September 15, 2010, 3:07 PM > On 09/15/2010 01:46 PM, reza yazdani > wrote: > > Function min_insn_size is defined under "#ifdef > > ASM_OUTPUT_MAX_SKIP_PAD" flag. Dispatch Scheduler > called the function > > after #endif. > > > > In this fix we move dispatch scheduler code under the > same #ifdef. > > That's hardly the correct fix. If the dispatch > scheduler needs > to use that function, then remove the ifdefs around its > definition. > > > r~ >