Re: [PATCH 46/74] x86, lto: Disable fancy hweight optimizations for LTO

2012-08-20 Thread Jan Beulich
>>> On 20.08.12 at 13:18, Andi Kleen wrote: >> That's not the point: The point really is that you could allow the >> alternative regardless of LTO, and just penalize the LTO case >> by having even the asm clobber the registers that a function call >> would not preserve. > > That's just what a no

Re: [PATCH 46/74] x86, lto: Disable fancy hweight optimizations for LTO

2012-08-20 Thread Andi Kleen
> That's not the point: The point really is that you could allow the > alternative regardless of LTO, and just penalize the LTO case > by having even the asm clobber the registers that a function call > would not preserve. That's just what a normal call does, right? -Andi -- a...@linux.intel.com

Re: [PATCH 46/74] x86, lto: Disable fancy hweight optimizations for LTO

2012-08-20 Thread Jan Beulich
>>> On 19.08.12 at 17:15, Andi Kleen wrote: >> >--- a/arch/x86/include/asm/arch_hweight.h >> >+++ b/arch/x86/include/asm/arch_hweight.h >> >@@ -25,9 +25,14 @@ static inline unsigned int __arch_hweight32(unsigned int >> >w) >> >{ >> >unsigned int res = 0; >> > >> >+#ifdef CONFIG_LTO >> >+

Re: [PATCH 46/74] x86, lto: Disable fancy hweight optimizations for LTO

2012-08-20 Thread Andi Kleen
> > config ARCH_HWEIGHT_CFLAGS > > string > > - default "-fcall-saved-ecx -fcall-saved-edx" if X86_32 > > - default "-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx > > -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 > > -fcall-saved-r11" if X86_64 > > + default "-

Re: [PATCH 46/74] x86, lto: Disable fancy hweight optimizations for LTO

2012-08-20 Thread Avi Kivity
On 08/19/2012 05:56 AM, Andi Kleen wrote: > From: Andi Kleen > > The fancy x86 hweight uses different compiler options for the > hweight file. This does not work with LTO. Just disable the optimization > with LTO > > Signed-off-by: Andi Kleen > --- > arch/x86/Kconfig|5

Re: [PATCH 46/74] x86, lto: Disable fancy hweight optimizations for LTO

2012-08-19 Thread Andi Kleen
> By moving this last line first you can avoid modifying the other two lines. Ok. > > >--- a/arch/x86/include/asm/arch_hweight.h > >+++ b/arch/x86/include/asm/arch_hweight.h > >@@ -25,9 +25,14 @@ static inline unsigned int __arch_hweight32(unsigned int > >w) > >{ > >unsigned int res = 0; >

Re: [PATCH 46/74] x86, lto: Disable fancy hweight optimizations for LTO

2012-08-19 Thread Jan Beulich
>>> Andi Kleen 08/19/12 4:58 AM >>> >--- a/arch/x86/Kconfig >+++ b/arch/x86/Kconfig >@@ -224,8 +224,9 @@ config X86_32_LAZY_GS > >config ARCH_HWEIGHT_CFLAGS >string >-default "-fcall-saved-ecx -fcall-saved-edx" if X86_32 >-default "-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx >

[PATCH 46/74] x86, lto: Disable fancy hweight optimizations for LTO

2012-08-18 Thread Andi Kleen
From: Andi Kleen The fancy x86 hweight uses different compiler options for the hweight file. This does not work with LTO. Just disable the optimization with LTO Signed-off-by: Andi Kleen --- arch/x86/Kconfig|5 +++-- arch/x86/include/asm/arch_hweight.h |9 +