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: Speed up _cpp_clean_line and _cpp_skip_block_comment


... another curiosity is that, comparing the code generated
by 3.3.1 and current 3.4 for the original testcase:

 void f(int* k, int j)
 {
   int i;

   for (i = 0; i < j; ++i)
     *k = *k + 2 * ((*k) - 1);
 }

at -O2, the inner loops are:

3.3.1
-----
 10:   48                      dec    %eax
 11:   8d 54 52 fe             lea    0xfffffffe(%edx,%edx,2),%edx
 15:   75 f9                   jne    10 <f+0x10>

3.4
---
 10:   8d 4c 52 fe             lea    0xfffffffe(%edx,%edx,2),%ecx
 14:   48                      dec    %eax
 15:   89 ca                   mov    %ecx,%edx
 17:   75 f7                   jne    10 <f+0x10>

isn't 3.3.1 better?

Paolo.


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