Looking at the benchmarks that have regressed, it looks like we're only
missing (to get back to r488)

mov [esp], XXX
add esp,0x4

==>

add esp,0x4

On Tue, Oct 14, 2008 at 9:54 AM, Kevin Millikin <[EMAIL PROTECTED]>wrote:

> I'll take a closer look.  I see a few suspicious things to get ironed out.
>
>
> On Tue, Oct 14, 2008 at 9:46 AM, Erik Corry <[EMAIL PROTECTED]> wrote:
>
>> That certainly helped, but it seems there are still some missing peephole
>> optimizations.  Bitops-bitwise-and has regressed.
>> Looking at the difference between 488 and 491 I see
>>
>> -0xf7becdaa   218  83c404         add esp,0x4
>> -0xf7becdad   221  ff7617         push [esi+0x17]
>> -0xf7becdb0   224  b92931eff7     mov ecx,0xf7ef3129          ;; object:
>> 0xf7ef3129 <String[1]: n>
>> -0xf7becdb5   229  e81660ffff     call LoadIC_Initialize  (0xf7be2dd0)
>> ;; debug: statement 1531
>> +0xf7becdb4   220  890424         mov [esp],eax
>> +0xf7becdb7   223  83c404         add esp,0x4
>> +0xf7becdba   226  ff7617         push [esi+0x17]
>> +0xf7becdbd   229  b92931eff7     mov ecx,0xf7ef3129          ;; object:
>> 0xf7ef3129 <String[1]: n>
>> +0xf7becdc2   234  e80960ffff     call LoadIC_Initialize  (0xf7be2dd0)
>> ;; debug: statement 1531
>>
>> Similar patterns can be seen other places. See attached diff.
>>
>>
>> On Mon, Oct 13, 2008 at 8:56 PM, Erik Corry <[EMAIL PROTECTED]> wrote:
>>
>>> LGTM
>>>
>>> On Mon, Oct 13, 2008 at 8:42 PM, <[EMAIL PROTECTED]> wrote:
>>>
>>>> Reviewers: Kevin Millikin, Erik Corry,
>>>>
>>>> Description:
>>>> Fix a missing peephole optimization in ia32 code exposed with Kevin's
>>>> change.
>>>>
>>>>
>>>> Please review this at http://codereview.chromium.org/7117
>>>>
>>>> Affected files:
>>>>  M     src/assembler-ia32.cc
>>>>
>>>>
>>>> Index: src/assembler-ia32.cc
>>>> ===================================================================
>>>> --- src/assembler-ia32.cc       (revision 490)
>>>> +++ src/assembler-ia32.cc       (working copy)
>>>> @@ -720,6 +720,23 @@
>>>>
>>>>
>>>>  void Assembler::add(const Operand& dst, const Immediate& x) {
>>>> +  ASSERT(reloc_info_writer.last_pc() != NULL);
>>>> +  if (FLAG_push_pop_elimination && (reloc_info_writer.last_pc() <=
>>>> last_pc_)) {
>>>> +    byte instr = last_pc_[0];
>>>> +    if ((instr & 0xf8) == 0x50) {
>>>> +      // Last instruction was a push. Check whether this is a pop
>>>> without a
>>>> +      // result.
>>>> +      if ((dst.is_reg(esp)) &&
>>>> +          (x.x_ == kPointerSize) && (x.rmode_ == RelocInfo::NONE)) {
>>>> +        pc_ = last_pc_;
>>>> +        last_pc_ = NULL;
>>>> +        if (FLAG_print_push_pop_elimination) {
>>>> +          PrintF("%d push/pop(noreg) eliminated\n", pc_offset());
>>>> +        }
>>>> +        return;
>>>> +      }
>>>> +    }
>>>> +  }
>>>>   EnsureSpace ensure_space(this);
>>>>   last_pc_ = pc_;
>>>>   emit_arith(0, dst, x);
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Erik Corry, Software Engineer
>>> Google Denmark ApS.  CVR nr. 28 86 69 84
>>> c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018 Copenhagen
>>> K, Denmark.
>>>
>>
>>
>>
>> --
>> Erik Corry, Software Engineer
>> Google Denmark ApS.  CVR nr. 28 86 69 84
>> c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018 Copenhagen
>> K, Denmark.
>>
>
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to