lkml.org 
[lkml]   [2015]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Optimize variable_test_bit()
On Fri, May 01, 2015 at 09:03:32AM -0700, Linus Torvalds wrote:
> On Fri, May 1, 2015 at 8:16 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > PPS. Jakub, I see gcc5.1 still hasn't got output operands for asm goto;
> > is this something we can get 'fixed' ?
>
> I suspect the problem is that now the particular register allocation
> choices are basically not just around the asm, they'd affect the
> target labels of the asm too.
>
> I think that for the kernel, it would *generally* be ok to just say
> that the outputs are only valid in the case the asm does *not* branch
> out, assuming that the *clobbers* obviously clobber things regardless.
> Keeping the register allocation for the asm itself still purely
> "local" to the asm.
>
> Something with a memory output we could just turn into a memory
> clobber (so we could do the test-and-change bits today without using
> any outputs - just mark memory clobbered).

The risk is of course that we'll cause too much stores and reloads
around them and regress instead of win.

A single variable clobber might be a solution here ?


\
 
 \ /
  Last update: 2015-05-01 19:01    [W:0.111 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site