Re: FW: Defect in GCC 4.4.0 bfin Port : Wrong code generated while accessing multiple arrays with different loop index variables within loop (-Os option)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-10-29 at 21:09 +0100, Bernd Schmidt wrote:
> Meena wrote:
> > 
> >          LSETUP (.L3, .L6) LC1 = P1;  <---- (1)
> >          jump.s .L2;                  <---- (2)
> >  .L3:
> >          R2 = [P0++];
> >          R3 = [P5++];
> >          R2 *= R3;
> >          R0 += 1;
> >          R1 = R1 + R2;
> >  .L2:
> >          R2 = P2;                     <---- (3)
> >  .L6:
> >          P2 += 1;                     <---- (4)
> > 
> > 
> > As per my understanding, when the control reaches within the loop i.e.
> > marked instruction (2), the control get transfered to the label .L2.
> > Then, it will execute the instructions (3) and (4). After executing
> > these instructions, control will again reach to first instruction of
> > loop i.e. (2). The above will be repeated for all iterations of loop.
> > Thus, the instructions between labels .L3 and .L2 will never get
> > executed.
> 
> No.  .L3 is the first instruction of the loop, as set up by LSETUP.
> 

Ok. But still I feel that following instructions within loop are
redundant (not required) after generating hardware loop:


          LSETUP (.L3, .L6) LC1 = P1;  
          jump.s .L2;  <---- [Redundant]
  .L3:
          R2 = [P0++];
          R3 = [P5++];
          R2 *= R3;
          R0 += 1;     <---- [Redundant]		
          R1 = R1 + R2;
  .L2:
          R2 = P2;     <---- [Redundant]
  .L6:
          P2 += 1;     <---- [Redundant]


Please confirm.


> 
> Bernd


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux