Re: Building GCC with -Wmissing-declarations and addressing its warnings

2014-02-19 Thread Jonathan Wakely
On 13 February 2014 20:47, Patrick Palka wrote: > On a related note, would a patch to officially enable > -Wmissing-declarations in the build process be well regarded? What would be the advantage? > Since > -Wmissing-prototypes is currently enabled, I assume it is the > intention of the GCC devs

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Linus Torvalds
On Wed, Feb 19, 2014 at 8:01 PM, Paul E. McKenney wrote: > > The control dependency should order subsequent stores, at least assuming > that "a" and "b" don't start off with identical stores that the compiler > could pull out of the "if" and merge. The same might also be true for ?: > for all I k

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Paul E. McKenney
On Wed, Feb 19, 2014 at 04:53:49PM -0800, Linus Torvalds wrote: > On Tue, Feb 18, 2014 at 11:47 AM, Torvald Riegel wrote: > > On Tue, 2014-02-18 at 09:44 -0800, Linus Torvalds wrote: > >> > >> Can you point to it? Because I can find a draft standard, and it sure > >> as hell does *not* contain any

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Linus Torvalds
On Tue, Feb 18, 2014 at 11:47 AM, Torvald Riegel wrote: > On Tue, 2014-02-18 at 09:44 -0800, Linus Torvalds wrote: >> >> Can you point to it? Because I can find a draft standard, and it sure >> as hell does *not* contain any clarity of the model. It has a *lot* of >> verbiage, but it's pretty much

Re: ARM inline assembly usage in Linux kernel

2014-02-19 Thread Renato Golin
On 19 February 2014 23:19, Andrew Pinski wrote: > With the unified assembly format, you should not need those > .arm/.thumb and in fact emitting them can make things even worse. If only we could get rid or all pre-UAL inline assembly on the planet... :) The has been the only reason why we added

Re: ARM inline assembly usage in Linux kernel

2014-02-19 Thread Andrew Pinski
On Wed, Feb 19, 2014 at 3:17 PM, Renato Golin wrote: > On 19 February 2014 11:58, Richard Sandiford > wrote: >> I agree that having an unrecognised asm shouldn't be a hard error until >> assembly time though. Saleem, is the problem that this is being rejected >> earlier? > > Hi Andrew, Richard,

Re: ARM inline assembly usage in Linux kernel

2014-02-19 Thread Renato Golin
On 19 February 2014 11:58, Richard Sandiford wrote: > I agree that having an unrecognised asm shouldn't be a hard error until > assembly time though. Saleem, is the problem that this is being rejected > earlier? Hi Andrew, Richard, Thanks for your reviews! We agree that we should actually just

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Paul E. McKenney
On Wed, Feb 19, 2014 at 06:55:51PM +0100, Torvald Riegel wrote: > On Wed, 2014-02-19 at 07:14 -0800, Paul E. McKenney wrote: > > On Wed, Feb 19, 2014 at 11:59:08AM +0100, Torvald Riegel wrote: [ . . . ] > > > On both sides, the compiler will see that mmap() (or similar) is called, > > > so that m

Re: Update x86-64 PLT for MPX

2014-02-19 Thread H.J. Lu
On Mon, Jan 27, 2014 at 1:50 PM, H.J. Lu wrote: > On Mon, Jan 27, 2014 at 1:42 PM, H.J. Lu wrote: >> On Sat, Jan 18, 2014 at 8:11 AM, H.J. Lu wrote: >>> Hi, >>> >>> Here is the proposal to update x86-64 PLT for MPX. The linker change >>> is implemented on hjl/mpx/pltext8 branch. Any comments/f

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Linus Torvalds
On Wed, Feb 19, 2014 at 6:40 AM, Torvald Riegel wrote: > > If all those other threads written in whichever way use the same memory > model and ABI for synchronization (e.g., choice of HW barriers for a > certain memory_order), it doesn't matter whether it's a hardware thread, > microcode, whatever

Re: TYPE_BINFO and canonical types at LTO

2014-02-19 Thread Jan Hubicka
> On Tue, 18 Feb 2014, Jan Hubicka wrote: > > > > > Non-ODR types born from other frontends will then need to be made to > > > > alias all the ODR variants that can be done by storing them into the > > > > current canonical type hash. > > > > (I wonder if we want to support cross language aliasi

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Torvald Riegel
On Wed, 2014-02-19 at 07:23 -0800, David Lang wrote: > On Tue, 18 Feb 2014, Torvald Riegel wrote: > > > On Tue, 2014-02-18 at 22:40 +0100, Peter Zijlstra wrote: > >> On Tue, Feb 18, 2014 at 10:21:56PM +0100, Torvald Riegel wrote: > >>> Well, that's how atomics that aren't volatile are defined in t

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Torvald Riegel
On Wed, 2014-02-19 at 07:14 -0800, Paul E. McKenney wrote: > On Wed, Feb 19, 2014 at 11:59:08AM +0100, Torvald Riegel wrote: > > On Tue, 2014-02-18 at 14:58 -0800, Paul E. McKenney wrote: > > > On Tue, Feb 18, 2014 at 10:40:15PM +0100, Torvald Riegel wrote: > > > > xagsmtp4.20140218214207.8...@vmsd

Re: Stack layout change during lra

2014-02-19 Thread Vladimir Makarov
On 2/19/2014, 6:54 AM, Joey Ye wrote: Vlad, When fixing PR60169, I found that reload fail to assert verify_initial_elim_offsets () if (insns_need_reload != 0 || something_needs_elimination || something_needs_operands_changed) { HOST_WIDE_INT old_frame_size = get_frame_size

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Paul E. McKenney
On Wed, Feb 19, 2014 at 11:59:08AM +0100, Torvald Riegel wrote: > On Tue, 2014-02-18 at 14:58 -0800, Paul E. McKenney wrote: > > On Tue, Feb 18, 2014 at 10:40:15PM +0100, Torvald Riegel wrote: > > > xagsmtp4.20140218214207.8...@vmsdvm9.vnet.ibm.com > > > X-Xagent-Gateway: vmsdvm9.vnet.ibm.com (XAGS

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread David Lang
On Tue, 18 Feb 2014, Torvald Riegel wrote: On Tue, 2014-02-18 at 22:40 +0100, Peter Zijlstra wrote: On Tue, Feb 18, 2014 at 10:21:56PM +0100, Torvald Riegel wrote: Well, that's how atomics that aren't volatile are defined in the standard. I can see that you want something else too, but that d

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Torvald Riegel
On Tue, 2014-02-18 at 14:14 -0800, Linus Torvalds wrote: > On Tue, Feb 18, 2014 at 1:21 PM, Torvald Riegel wrote: > >> > >> So imagine that you have some clever global optimizer that sees that > >> the program never ever actually sets the dirty bit at all in any > >> thread, and then uses that kin

Re: TYPE_BINFO and canonical types at LTO

2014-02-19 Thread Richard Biener
On Tue, 18 Feb 2014, Jan Hubicka wrote: > > > Non-ODR types born from other frontends will then need to be made to > > > alias all the ODR variants that can be done by storing them into the > > > current canonical type hash. > > > (I wonder if we want to support cross language aliasing for non-P

Re: ARM inline assembly usage in Linux kernel

2014-02-19 Thread Richard Sandiford
Andrew Pinski writes: > On Tue, Feb 18, 2014 at 6:56 PM, Saleem Abdulrasool > wrote: >> Hello. >> >> I am sending this at the behest of Renato. I have been working on the ARM >> integrated assembler in LLVM and came across an interesting item in the Linux >> kernel. >> >> I am wondering if this

Stack layout change during lra

2014-02-19 Thread Joey Ye
Vlad, When fixing PR60169, I found that reload fail to assert verify_initial_elim_offsets () if (insns_need_reload != 0 || something_needs_elimination || something_needs_operands_changed) { HOST_WIDE_INT old_frame_size = get_frame_size (); reload_as_needed (global);

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Peter Zijlstra
On Wed, Feb 19, 2014 at 12:07:02PM +0100, Torvald Riegel wrote: > > Its not only hardware; also the kernel/user boundary has this same > > problem. We cannot a-priory say what userspace will do; in fact, because > > we're a general purpose OS, we must assume it will willfully try its > > bestest to

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Torvald Riegel
On Tue, 2014-02-18 at 22:47 +0100, Peter Zijlstra wrote: > On Tue, Feb 18, 2014 at 10:21:56PM +0100, Torvald Riegel wrote: > > Yes, I do. But that seems to be "volatile" territory. It crosses the > > boundaries of the abstract machine, and thus is input/output. Which > > fraction of your atomic

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Torvald Riegel
On Tue, 2014-02-18 at 14:58 -0800, Paul E. McKenney wrote: > On Tue, Feb 18, 2014 at 10:40:15PM +0100, Torvald Riegel wrote: > > xagsmtp4.20140218214207.8...@vmsdvm9.vnet.ibm.com > > X-Xagent-Gateway: vmsdvm9.vnet.ibm.com (XAGSMTP4 at VMSDVM9) > > > > On Tue, 2014-02-18 at 09:16 -0800, Paul E. McK

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Torvald Riegel
On Tue, 2014-02-18 at 22:52 +0100, Peter Zijlstra wrote: > > > 4.Some drivers allow user-mode code to mmap() some of their > > > state. Any changes undertaken by the user-mode code would > > > be invisible to the compiler. > > > > A good point, but a compiler that doesn't try to (inco

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-19 Thread Torvald Riegel
On Tue, 2014-02-18 at 23:48 +, Peter Sewell wrote: > On 18 February 2014 20:43, Torvald Riegel wrote: > > On Tue, 2014-02-18 at 12:12 +, Peter Sewell wrote: > >> Several of you have said that the standard and compiler should not > >> permit speculative writes of atomics, or (effectively) t