Messages in this thread | | | Date | Fri, 1 May 2015 18:18:53 +0200 | From | Peter Zijlstra <> | Subject | Re: [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 ?
| |