Re: Observations on LLSC and SMP

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

 



On Fri, Mar 25, 2005 at 02:46:04PM -0800, Ed Martini wrote:
> Daniel Jacobowitz wrote:
> 
> >On Fri, Mar 25, 2005 at 11:24:05AM -0800, Ed Martini wrote:
> > 
> >
> >>1. If the first part of the if were an ifdef instead it would result in 
> >>a code size reduction as well as a runtime performance gain.
> >>   
> >>
> >
> >You should spend a little time playing with an optimizing compiler. 
> >They're capable of working out when a condition will always be false.
> > 
> >
> Yes, but in the case where R10000_LLSC_WAR is true, but cpu_has_llsc 
> returns false there are still two wasted tests, and two blocks of code 
> that the compiler can't optimize out.

Not only is cpu_has_llsc often a constant, R10000_LLSC_WAR will never
be true if the CPU does not have LL/SC.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux