Message ID | 4F19AED1.40008@redhat.com |
---|---|
State | New |
Headers | show |
Unfortunately patch doesn't help neither for separate EEMBC_2_0 tests nor for the whole benchmark. Do you want me to do some debugging here? On Fri, Jan 20, 2012 at 10:13 PM, Vladimir Makarov <vmakarov@redhat.com> wrote: > On 01/19/2012 03:52 PM, Vladimir Makarov wrote: >> >> On 01/18/2012 02:30 PM, Zamyatin, Igor wrote: >>> >>> Yes, we use Atom for EEMBC measurements. >>> >>> We'll be glad to help you with your findings. >>> >>> >> Thanks. >> >> Unfortunately I tried several alternative patches but I did not find a >> better solution (it is mostly code size degradation on CoreI7). Now I am >> even thinking that the best action would have been ignoring the original PR. >> > Could you try the attached patch. It might work. > > I've tried several approach to prevent small hole creation in > ira-color.c::assign_hard_reg but it does not work well. > > Thanks. > >
On 01/23/2012 06:32 AM, Igor Zamyatin wrote: > Unfortunately patch doesn't help neither for separate EEMBC_2_0 tests > nor for the whole benchmark. > > Do you want me to do some debugging here? > For now I am out of ideas how to fix the PR in alternative way without some performance degradation on SPEC or EEMBC. Any reduced test case from EEMBC where I can see performance degradation might help me too.
Index: ira-color.c =================================================================== --- ira-color.c (revision 183312) +++ ira-color.c (working copy) @@ -1798,16 +1798,16 @@ bucket_allocno_compare_func (const void int diff, a1_freq, a2_freq, a1_num, a2_num; int cl1 = ALLOCNO_CLASS (a1), cl2 = ALLOCNO_CLASS (a2); - /* Push pseudos requiring less hard registers first. It means that - we will assign pseudos requiring more hard registers first - avoiding creation small holes in free hard register file into - which the pseudos requiring more hard registers can not fit. */ - if ((diff = (ira_reg_class_max_nregs[cl1][ALLOCNO_MODE (a1)] - - ira_reg_class_max_nregs[cl2][ALLOCNO_MODE (a2)])) != 0) - return diff; a1_freq = ALLOCNO_FREQ (a1); a2_freq = ALLOCNO_FREQ (a2); - if ((diff = a1_freq - a2_freq) != 0) + /* Prefer to push pseudos requiring less hard registers first. It + means that we will assign pseudos requiring more hard registers + first avoiding creation small holes in free hard register file + into which the pseudos requiring more hard registers can not + fit. */ + if ((diff = (a1_freq * ira_reg_class_max_nregs[cl1][ALLOCNO_MODE (a1)] + - a2_freq * ira_reg_class_max_nregs[cl2][ALLOCNO_MODE (a2)])) + != 0) return diff; a1_num = ALLOCNO_COLOR_DATA (a1)->available_regs_num; a2_num = ALLOCNO_COLOR_DATA (a2)->available_regs_num;