Re: -fno-tree-cselim not working?

2007-10-26 Thread Jakub Jelinek
On Thu, Oct 25, 2007 at 09:40:32PM -0700, David Miller wrote: > > Code like needs to use volatile or explicit memory barriers. > > I totally disagree with you, and I think POSIX does too. Yeah. See also http://gcc.gnu.org/PR31862 Unsafe optimizations in loop IM, if conversion, etc. really either

Re: -fno-tree-cselim not working?

2007-10-26 Thread skaller
On Thu, 2007-10-25 at 21:50 -0700, Ian Lance Taylor wrote: > David Miller <[EMAIL PROTECTED]> writes: > > > From: Ian Lance Taylor <[EMAIL PROTECTED]> I'm having some trouble following this discussion. In serial code, assume we permit a register to transiently alias a variable. For this to be

Re: -fno-tree-cselim not working?

2007-10-26 Thread Jakub Jelinek
On Fri, Oct 26, 2007 at 12:27:01AM -0700, David Miller wrote: > From: Jakub Jelinek <[EMAIL PROTECTED]> > Date: Fri, 26 Oct 2007 09:09:03 +0200 > > > MEMs in current function's stack frame can be considered safe as > > well. > > Unless they are passed by reference down into functions or > a refer

Re: -fno-tree-cselim not working?

2007-10-26 Thread David Miller
From: Jakub Jelinek <[EMAIL PROTECTED]> Date: Fri, 26 Oct 2007 09:48:25 +0200 > On Fri, Oct 26, 2007 at 12:27:01AM -0700, David Miller wrote: > > From: Jakub Jelinek <[EMAIL PROTECTED]> > > Date: Fri, 26 Oct 2007 09:09:03 +0200 > > > > > MEMs in current function's stack frame can be considered sa

Re: -fno-tree-cselim not working?

2007-10-26 Thread David Miller
From: Jakub Jelinek <[EMAIL PROTECTED]> Date: Fri, 26 Oct 2007 09:09:03 +0200 > MEMs in current function's stack frame can be considered safe as > well. Unless they are passed by reference down into functions or a reference to them is assigned into an externally visible structure. We actually ha

Re: Removal of pre-ISO C++ items from include/backwards

2007-10-26 Thread Richard Guenther
On Thu, 25 Oct 2007, Joe Buck wrote: > Has anyone checked yet on the impact on a Debian distribution of > these proposed changes (and even for things that are checked in, > they should only be thought of as "proposed" at this point)? I re-built openSUSE with both changes and the ext/ stuff causes

Re: Removal of pre-ISO C++ items from include/backwards

2007-10-26 Thread Gabriel Dos Reis
On Fri, 26 Oct 2007, skaller wrote: | | On Thu, 2007-10-25 at 20:34 -0500, Gabriel Dos Reis wrote: | > On Fri, 26 Oct 2007, skaller wrote: | > | > | I should point out retaining 'old' features can create a | > | significant maintenance burden for gcc developers, | > | > In this specific case, w

Re: -fno-tree-cselim not working?

2007-10-26 Thread Andreas Schwab
Ian Lance Taylor <[EMAIL PROTECTED]> writes: > The above code happens to use pthread_mutex_trylock, but there is no > need for that. pthread_mutex_trylock is special, because POSIX says it is a memory synchronisation point (see section 4.10 Memory Synchronization). Andreas. -- Andreas Schwab,

Re: problem with iv folding

2007-10-26 Thread Zdenek Dvorak
Hi, > traceback, tt, and ops follow. Why is this going wrong? > [ gdb ] call debug_tree(arg0) > type > [ gdb ] call debug_tree(arg1) > type

Autovectorized HIRLAM - latest results.

2007-10-26 Thread Toon Moene
In August, I wrote the following about vectorized / not vectorized loops in HIRLAM (see http://hirlam.org): $ grep 'LOOP VECTORIZED' HL_Prepare_00.html | wc -l 3273 $ grep 'not vectorized' HL_Prepare_00.html | wc -l 7845 Yesterday, I performed a test with gcc-trunk-129472 (which is a week

Re: alias and pointers analysis

2007-10-26 Thread Diego Novillo
On 10/26/07, J.C. Pizarro <[EMAIL PROTECTED]> wrote: > What is the matter if the 'b' var. is unused and > optimally removed by the SSA algorithm? In this case, it will not be removed. If any of the p_i pointers is ever dereferenced in this code, that will be considered a use of variable 'b'. >

Re: GCC 4.3 release schedule

2007-10-26 Thread Richard Guenther
On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: > > Now that GCC is in stage 4.3, I think we'd all be in agreement that it > would be nice to keep this stage short and get a release out. > > We are interested in using 4.3 as the system compiler in Fedora 9, and > as such, we'd like to nail d

GCC 4.3 release schedule

2007-10-26 Thread Andrew MacLeod
Now that GCC is in stage 4.3, I think we'd all be in agreement that it would be nice to keep this stage short and get a release out. We are interested in using 4.3 as the system compiler in Fedora 9, and as such, we'd like to nail down some time lines and requirements with release management

Re: -fno-tree-cselim not working?

2007-10-26 Thread Samuel Tardieu
> "David" == David Miller <[EMAIL PROTECTED]> writes: David> I suspect that local.a++ will be represented as a frame relative David> access. Test compiles show that gcc does update the on-stack David> copy on Sparc, It does on i386 too. David> now just to check if the conditional memory ope

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Bart Van Assche
On 10/21/07, Tomash Brechko <[EMAIL PROTECTED]> wrote: > Hello, > > I have a question regarding the thread-safeness of a particular GCC > optimization. I'm sorry if this was already discussed on the list, if > so please provide me with the reference to the previous discussion. > > Consider this p

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Bart Van Assche
On 10/22/07, Andrew Haley wrote: > The core problem here seems to be that the "C with threads" memory > model isn't sufficiently well-defined to make a determination > possible. You're assuming that you have no responsibility to mark > shared memory protected by a mutex as volatile, but I know o

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
David Miller <[EMAIL PROTECTED]> writes: > This is not a game or some fun theoretical discussion about language > semantics. People will be harmed and lose lots of their own personal > time debugging these kinds of things if GCC generates code like this. > It's unreasonable, regardless of what th

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
David Miller <[EMAIL PROTECTED]> writes: > Even in cases like: > > typedef unsigned char spinlock_t; > extern int spin_trylock(spinlock_t *); > extern int spin_unlock(spinlock_t *); > > struct foo { >spinlock_t lock; >int a; > }; > > extern void foo_register(struct foo *p); > ex

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Tomash Brechko
Hello Bart, Thanks for the summary. There are good pointers in this e-mail thread regarding the current state of the process of defining memory model for C++ (and eventually for C I guess). >From those pointers several conclusions may be made (which are in line with that you said): - though n

Re: GCC 4.3 release schedule

2007-10-26 Thread Andrew MacLeod
Richard Guenther wrote: On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: Now that GCC is in stage 4.3, I think we'd all be in agreement that it would be nice to keep this stage short and get a release out. We are interested in using 4.3 as the system compiler in Fedora 9, and as such,

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
Jakub Jelinek <[EMAIL PROTECTED]> writes: > Unsafe optimizations in loop IM, if conversion, etc. really either need > to be conditionalized on some new switch whether code should be thread > safe or not, or just need to be disabled altogether. Of course if > gcc can prove the variable is written

Re: -fno-tree-cselim not working?

2007-10-26 Thread skaller
On Fri, 2007-10-26 at 07:58 -0700, Ian Lance Taylor wrote: > skaller <[EMAIL PROTECTED]> writes: > > > As I understand it volatile is typically used as a 'hint' > > to the compiler that there could be aliases it cannot see. > > This is independent of the use suggesting asynchronous changes > > in

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Robert Dewar
Andrew Haley wrote: Hmmm. This is an interesting idea, but it sounds to me as though it's somewhat at variance with what is proposed by the C++ threads working group. In any case, gcc will certainly implement whatever the standards committees come up with, but that is probably two years away.

RE: -fno-tree-cselim not working?

2007-10-26 Thread Dave Korn
On 26 October 2007 15:59, Ian Lance Taylor wrote: > Andreas Schwab <[EMAIL PROTECTED]> writes: > >> Ian Lance Taylor <[EMAIL PROTECTED]> writes: >> >>> The above code happens to use pthread_mutex_trylock, but there is no >>> need for that. >> >> pthread_mutex_trylock is special, because POSIX s

RE: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Dave Korn
On 26 October 2007 16:15, Robert Dewar wrote: > One problem at the language standards level is that you can't easily > talk about loads and stores, since you are defining an as-if semantic > model, and if you make a statement about loads and stores, any other > sequence which behaves as if that se

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
skaller <[EMAIL PROTECTED]> writes: > As I understand it volatile is typically used as a 'hint' > to the compiler that there could be aliases it cannot see. > This is independent of the use suggesting asynchronous changes > in a hardware port for example, although the effect is the same. Not real

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
Andreas Schwab <[EMAIL PROTECTED]> writes: > Ian Lance Taylor <[EMAIL PROTECTED]> writes: > > > The above code happens to use pthread_mutex_trylock, but there is no > > need for that. > > pthread_mutex_trylock is special, because POSIX says it is a memory > synchronisation point (see section 4.1

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Andrew Haley
Bart Van Assche writes: > On 10/22/07, Andrew Haley wrote: > > > The core problem here seems to be that the "C with threads" memory > > model isn't sufficiently well-defined to make a determination > > possible. You're assuming that you have no responsibility to mark > > shared memory prot

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Ian Lance Taylor
"Bart Van Assche" <[EMAIL PROTECTED]> writes: > * As known the compiler may reorder function calls and assignments > to non-volatile variables if the compiler can prove that the called > function won't modify that variable. This becomes problematic if the > variable is modified by more than one

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Ian Lance Taylor
Tomash Brechko <[EMAIL PROTECTED]> writes: > - the compiler should not introduce speculative stores to the shared > objects. This is what my original question was about. I haven't > read all the papers yet, so one thing is still unclear to me: it > seems like atomic variables will

Re: -fno-tree-cselim not working?

2007-10-26 Thread Andrew Haley
Ian Lance Taylor writes: > As I understand it, the draft C++0x memory model has acquire release > semantics for annotated variables. Of course, it wouldn't help the > originalk test case unless the global variable was annotated. Mmm, but one of the authors of the draft C++0x memory model tell

Re: GCC 4.3 release schedule

2007-10-26 Thread Richard Guenther
On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: > Richard Guenther wrote: > > On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: > >> > >> Nov 14th - we'd like to start building F9 with a 4.3 compiler. Ideally > >> we'd have a branch cut no later than that and starting to stabilize > >>

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
skaller <[EMAIL PROTECTED]> writes: > On Fri, 2007-10-26 at 07:58 -0700, Ian Lance Taylor wrote: > > skaller <[EMAIL PROTECTED]> writes: > > > > > As I understand it volatile is typically used as a 'hint' > > > to the compiler that there could be aliases it cannot see. > > > This is independent o

RE: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Dave Korn
On 26 October 2007 16:51, Tomash Brechko wrote: > On Fri, Oct 26, 2007 at 08:32:07 -0700, Ian Lance Taylor wrote: >> The language standard does not forbid speculative stores to non-atomic >> objects. > * Disallow speculative stores on potentially shared objects. > * Disallow reading a

Re: GCC 4.3 release schedule

2007-10-26 Thread Dennis Clarke
> On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: >> Richard Guenther wrote: >> > On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: >> >> > > ... when we think it's ready. It doesn't help anyone to declare victory > and release 4.3.0 when it still miscompiles the kernel (not that I k

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread skaller
On Fri, 2007-10-26 at 16:05 +0200, Bart Van Assche wrote: > On 10/22/07, Andrew Haley wrote: > I agree that according to the C and C++ language standards, any > variable shared over threads should be declared volatile. No, they say nothing about multi-threaded programs. > My opinion is that it

RE: -fno-tree-cselim not working?

2007-10-26 Thread Andrew Haley
Dave Korn writes: > On 26 October 2007 15:59, Ian Lance Taylor wrote: > > > Andreas Schwab <[EMAIL PROTECTED]> writes: > > > >> Ian Lance Taylor <[EMAIL PROTECTED]> writes: > >> > >>> The above code happens to use pthread_mutex_trylock, but there is no > >>> need for that. > >> > >> p

Re: GCC 4.3 release schedule

2007-10-26 Thread Mark Mitchell
Andrew MacLeod wrote: > we can at least make projected dates known so we have something firmer > than "at some point in the future" :-) The canonical rule of project management is: "Features, Schedule, Cost: Pick At Most 2." :-) In other words, you can decide what features you want and when you

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Tomash Brechko
On Fri, Oct 26, 2007 at 08:32:07 -0700, Ian Lance Taylor wrote: > The language standard does not forbid speculative stores to non-atomic > objects. That's why there's a proposal to refine the language. I was meaning the folloing: http://www.artima.com/cppsource/threads_meeting.html: Hans Bo

Re: GCC 4.3 release schedule

2007-10-26 Thread Richard Guenther
On 10/26/07, Dennis Clarke <[EMAIL PROTECTED]> wrote: > > > On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: > >> Richard Guenther wrote: > >> > On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: > >> >> > > > > > ... when we think it's ready. It doesn't help anyone to declare victory >

Re: GCC 4.3 release schedule

2007-10-26 Thread Dennis Clarke
> Mark Mitchell wrote: >> As I said in >> my status report, our practice has been to cut the release branch when >> we reach 100 regressions, and release 2-4 months after that point, >> depending on quality on the branch. To be honest, I'd rather wait >> longer to make the branch -- but there ten

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Samuel Tardieu
> "Sam" == Samuel Tardieu <[EMAIL PROTECTED]> writes: Sam> In the following example, is the access to "Shared" considered Sam> unsynchronized even though what looks like a proper lock is used Sam> around it? Call to Always_Unlock was incorrect in the previous example, a fixed one exhibiting t

RE: -fno-tree-cselim not working?

2007-10-26 Thread Dave Korn
On 26 October 2007 17:11, Andrew Haley wrote: > > Perhaps I've jumped into the wrong one of the two near-identical > > threads we have going on this, but my understanding of the original > > complaint was that gcc writes to the variable regardless of whether > > it needs an update or not, an

Re: -fno-tree-cselim not working?

2007-10-26 Thread skaller
On Fri, 2007-10-26 at 08:27 -0700, Ian Lance Taylor wrote: > skaller <[EMAIL PROTECTED]> writes: > > > I understand that's the common meaning .. but the semantics > > aren't specified for ISO C/C++. > > Sure they are. In the C99 standard look at the definition of sequence > points (5.1.2.3) an

RE: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread skaller
On Fri, 2007-10-26 at 16:24 +0100, Dave Korn wrote: > On 26 October 2007 16:15, Robert Dewar wrote: > > > One problem at the language standards level is that you can't easily > > talk about loads and stores, since you are defining an as-if semantic > > model, and if you make a statement about loa

RFC: Creating a live, all-encompassing architectural document for GCC

2007-10-26 Thread Diego Novillo
This idea is still very raw in my mind, so apologies in advance for being deliberately vague. For the last few weeks I have been thinking on ways to address the sorry state of our internal documentation. We all agree that none of us has global knowledge of all aspects of the compiler. It's just

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread skaller
On Fri, 2007-10-26 at 20:17 +0400, Tomash Brechko wrote: > cases. Only globals, or locals which address was passed to some > function, should be treated specially. err .. what about the heap?? And what do you do if you do not KNOW what the storage class is, which is the case 99.99% of the ti

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Michael Matz
Hi, On Fri, 26 Oct 2007, Tomash Brechko wrote: > It was already said that instead of disallowing all optimization with > volatile, the optimization itself may be made a bit differently. > Besides, the concern that it will hurt performance at large is a bit > far-stretched. You still may speculat

RE: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Richard Kenner
I thought it was pretty clear in intent: the compiler will emit exactly one machine load/store operation for any rvalue reference/lvalue assignment (respectively) in the source, at the exact sequence point in the generated code corresponding to the location of the reference

RE: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Michael Matz
Hi, On Sat, 27 Oct 2007, skaller wrote: > The point is -- there is no new rule here, and no definition > of what a volatile semantics is: volatile variables have > the SAME 'semantics' as any other variable. If I write: > > int a = 1; > printf("%d", a); > int b = 2; > pri

RE: -fno-tree-cselim not working?

2007-10-26 Thread Dave Korn
On 26 October 2007 17:28, Andrew Haley wrote: > Richard Guenther writes: > > > > > > This is legal POSIX threads code: counter is not accessed when we do > > > not hold the mutex. According to POSIX we do not have to declare > > > volatile memory that we only access when we hold a mutex. > >

Re: -fno-tree-cselim not working?

2007-10-26 Thread Richard Guenther
On 10/26/07, Andrew Haley <[EMAIL PROTECTED]> wrote: > Dave Korn writes: > > On 26 October 2007 16:27, Andrew Haley wrote: > > > > > Dave Korn writes: > > > > On 26 October 2007 15:59, Ian Lance Taylor wrote: > > > > > > > Sure. But the argument that gcc is doing something wrong stands up

Re: GCC 4.3 release schedule

2007-10-26 Thread David Daney
Mark Mitchell wrote: As I said in my status report, our practice has been to cut the release branch when we reach 100 regressions, and release 2-4 months after that point, depending on quality on the branch. To be honest, I'd rather wait longer to make the branch -- but there tends to be intense

RE: -fno-tree-cselim not working?

2007-10-26 Thread Andrew Haley
Dave Korn writes: > On 26 October 2007 16:27, Andrew Haley wrote: > > > Dave Korn writes: > > > On 26 October 2007 15:59, Ian Lance Taylor wrote: > > > > > Sure. But the argument that gcc is doing something wrong stands up > > > > just fine even we just test a global variable. The arg

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Samuel Tardieu
On 26/10, Robert Dewar wrote: | Of course in Ada there is a clear notion of threads semantic, and | a clear definition of what the meaning of code is in the presence | of threads, so the specific situation discussed here is easy to | deal with (though Ada takes the view that unsychronized shared a

RE: -fno-tree-cselim not working?

2007-10-26 Thread Dave Korn
On 26 October 2007 16:27, Andrew Haley wrote: > Dave Korn writes: > > On 26 October 2007 15:59, Ian Lance Taylor wrote: > > > Sure. But the argument that gcc is doing something wrong stands up > > > just fine even we just test a global variable. The argument that gcc > > > is doing somethin

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Tomash Brechko
On Fri, Oct 26, 2007 at 17:00:28 +0100, Dave Korn wrote: > > * Disallow speculative stores on potentially shared objects. > > * Disallow reading and re-writing of unrelated objects. (For > > instance, if you have struct S{ char a,b; }; it is not OK to > > modify b by rea

Re: GCC 4.3 release schedule

2007-10-26 Thread Richard Guenther
On 10/26/07, Mark Mitchell <[EMAIL PROTECTED]> wrote: > > I've found schedules for GCC to be very hard to predict. As I said in > my status report, our practice has been to cut the release branch when > we reach 100 regressions, and release 2-4 months after that point, > depending on quality on th

Re: -fno-tree-cselim not working?

2007-10-26 Thread Andrew Haley
Richard Guenther writes: > > > > This is legal POSIX threads code: counter is not accessed when we do > > not hold the mutex. According to POSIX we do not have to declare > > volatile memory that we only access when we hold a mutex. > > I hope we're not trying to support such w/o volatile c

Re: GCC 4.3 release schedule

2007-10-26 Thread Dennis Clarke
> On 10/26/07, Dennis Clarke <[EMAIL PROTECTED]> wrote: >>On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: >> >> Richard Guenther wrote: >> >> > On 10/26/07, Andrew MacLeod <[EMAIL PROTECTED]> wrote: >> >> >> >> >> > >> > ... when we think it's ready. It doesn't help anyone to declare victor

RE: -fno-tree-cselim not working?

2007-10-26 Thread Andrew Haley
Dave Korn writes: > On 26 October 2007 17:11, Andrew Haley wrote: > > > > Perhaps I've jumped into the wrong one of the two near-identical > > > threads we have going on this, but my understanding of the original > > > complaint was that gcc writes to the variable regardless of whether

Re: -fno-tree-cselim not working?

2007-10-26 Thread Andrew Haley
Ian Lance Taylor writes: > Andrew Haley <[EMAIL PROTECTED]> writes: > > > The problem is code like this: > > > > int counter; > > > > ... > > > > if (we_hold_counters_mutex) > > counter++; > > > > This is legal POSIX threads code: counter is not accessed when we do > > not h

Re: How widely used are and ?

2007-10-26 Thread Joe Buck
I wrote: > > The thread arguing about this has gone on for a while, so I think > > it's time to gather some data to answer the question of just how bad > > it will be if we accept the decision to move ext/hash_set and ext_hash_map > > into a different directory and to deprecate them. > > > > Any

Re: Removal of pre-ISO C++ items from include/backwards

2007-10-26 Thread Joe Buck
On Thu, 25 Oct 2007, Joe Buck wrote: > > Has anyone checked yet on the impact on a Debian distribution of > > these proposed changes (and even for things that are checked in, > > they should only be thought of as "proposed" at this point)? On Fri, Oct 26, 2007 at 10:21:57AM +0200, Richard Guenthe

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Tomash Brechko
On Fri, Oct 26, 2007 at 19:04:10 +0200, Michael Matz wrote: > int f(int M, int *mc, int *mpp, int *tpmm, int *ip, int *tpim, int *dpp, > int *tpdm, int xmb, int *bp, int *ms) > { > int k, sc; > for (k = 1; k <= M; k++) > { > mc[k] = mpp[k-1] + tpmm[k-1]; > if ((sc = ip[k

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Tomash Brechko
On Fri, Oct 26, 2007 at 21:45:03 +0400, Tomash Brechko wrote: > Note that it doesn't cancel cmoves, as those are loads, not stores. I just checked with x86 instruction reference, CMOVcc is reg->reg or mem->reg, never reg->mem. You know God's deed when you see it. :) -- Tomash Brechko

Re: RFC: Creating a live, all-encompassing architectural document for GCC

2007-10-26 Thread skaller
On Fri, 2007-10-26 at 19:34 +0200, Basile STARYNKEVITCH wrote: > Diego Novillo wrote: > I am more thinking loud than actually believing that it would be a good > idea to switch to literate programming; I have mixed feelings towards > this approach, which has been extensively used in the C-- com

RE: -fno-tree-cselim not working?

2007-10-26 Thread skaller
On Fri, 2007-10-26 at 17:31 +0100, Dave Korn wrote: > On 26 October 2007 17:11, Andrew Haley wrote: > Is the problem that POSIX doesn't make the distinction between as-if and > actual behaviour that is such an essential part of the C standard? The 'as-if' rule is present in ALL Standards of al

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
Andrew Haley <[EMAIL PROTECTED]> writes: > The problem is code like this: > > int counter; > > ... > > if (we_hold_counters_mutex) > counter++; > > This is legal POSIX threads code: counter is not accessed when we do > not hold the mutex. According to POSIX we do not have to declare > v

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
skaller <[EMAIL PROTECTED]> writes: > On Fri, 2007-10-26 at 08:27 -0700, Ian Lance Taylor wrote: > > skaller <[EMAIL PROTECTED]> writes: > > > > > > I understand that's the common meaning .. but the semantics > > > aren't specified for ISO C/C++. > > > > Sure they are. In the C99 standard look

Re: RFC: Creating a live, all-encompassing architectural document for GCC

2007-10-26 Thread Basile STARYNKEVITCH
Diego Novillo wrote: This idea is still very raw in my mind, so apologies in advance for being deliberately vague. For the last few weeks I have been thinking on ways to address the sorry state of our internal documentation. We all agree that none of us has global knowledge of all aspects of th

Re: GCC 4.3 release schedule

2007-10-26 Thread Dennis Clarke
>> When I look at the Build status page I see no one has posted a result >> there for GCC 4.2.2 : >> >> Please see : http://gcc.gnu.org/gcc-4.2/buildstat.html > > Here are a couple of posts by Kaveh: > http://gcc.gnu.org/ml/gcc-testresults/2007-10/msg00388.html > http://gcc.gnu.org/ml/gcc-te

Re: GCC 4.3 release schedule

2007-10-26 Thread Eric Botcazou
> Why isn't the main page for build reports updated ? Will do. > It *looks* like no one ( me too ) is getting clean builds. The GCC 4.2.x compiler is in pretty good shape on SPARC/Solaris, modulo the libgomp problems on Solaris 10 with the Sun tools. You need to use the GNU tools if you care

Re: GCC 4.3 release schedule

2007-10-26 Thread Dennis Clarke
>> Why isn't the main page for build reports updated ? > > Will do. > >> It *looks* like no one ( me too ) is getting clean builds. > > The GCC 4.2.x compiler is in pretty good shape on SPARC/Solaris, modulo the > libgomp problems on Solaris 10 with the Sun tools. You need to use the GNU > tools

Re: GCC 4.3 release schedule

2007-10-26 Thread Martin Michlmayr
* Richard Guenther <[EMAIL PROTECTED]> [2007-10-26 17:51]: > Yes. I think Ubuntu is on track for 4.3 as well, most likely Debian, too. I've been testing 4.3 on a number of architectures Debian supports and filings bugs. There are still many that haven't been resolved yet. Of course, gcc 4.3 also

Re: GCC 4.3 release schedule

2007-10-26 Thread Eric Botcazou
> When I look at the Build status page I see no one has posted a result > there for GCC 4.2.2 : > > Please see : http://gcc.gnu.org/gcc-4.2/buildstat.html Here are a couple of posts by Kaveh: http://gcc.gnu.org/ml/gcc-testresults/2007-10/msg00388.html http://gcc.gnu.org/ml/gcc-testresults/20

Re: Removal of pre-ISO C++ items from include/backwards

2007-10-26 Thread Jonathan Wakely
On 26/10/2007, skaller <[EMAIL PROTECTED]> wrote: > On Thu, 2007-10-25 at 22:56 +0100, Jonathan Wakely wrote: > > The plan is to also move auto_ptr and the old bind1st/bind2nd function > > binders to backward, if/when they are deprecated in C++0x, which would > > give them the same status as (depr

Re: GCC 4.3 release schedule

2007-10-26 Thread Joe Buck
On Fri, Oct 26, 2007 at 08:20:02PM +0200, Martin Michlmayr wrote: > * Richard Guenther <[EMAIL PROTECTED]> [2007-10-26 17:51]: > > Yes. I think Ubuntu is on track for 4.3 as well, most likely Debian, too. > > I've been testing 4.3 on a number of architectures Debian supports and > filings bugs.

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Tomash Brechko
On Sat, Oct 27, 2007 at 03:06:21 +1000, skaller wrote: > err .. what about the heap?? The heap are objects for which the addresses were taken. So they can be shared. But I haven't yet seen that the optimization we discuss is being applied to the object accessed though the pointer (see my reply t

Re: RFC: Creating a live, all-encompassing architectural document for GCC

2007-10-26 Thread Diego Novillo
On 10/26/07, Basile STARYNKEVITCH <[EMAIL PROTECTED]> wrote: > Maybe a possible approach would be to use literate programming > techniques; By previous experience (still limited), I would believe that > it would be more worthwhile on the interface files (ie the *.h files, > some *.opt, etc...) tha

Re: RTL/VCG inconsistency (the check_match.7758 case)

2007-10-26 Thread Diego Novillo
On 10/24/07, Sunzir Deepur <[EMAIL PROTECTED]> wrote: > Any idea on why this inconsistency happen and how to solve it > (probably the VCG dumper should somehow use "check_match.7758" as the base > of the function name and not "check_match") ? Feel free to offer patches to fix this inconsistency.

Re: -fno-tree-cselim not working?

2007-10-26 Thread Andi Kleen
Ian Lance Taylor <[EMAIL PROTECTED]> writes: > > This code isn't going to be a problem, because spin_unlock presumably > includes a memory barrier. At least in the Linux kernel and also in glibc for mutexes locks are just plain function calls, which are not necessarily full memory barriers. -Andi

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
Andi Kleen <[EMAIL PROTECTED]> writes: > Ian Lance Taylor <[EMAIL PROTECTED]> writes: > > > > This code isn't going to be a problem, because spin_unlock presumably > > includes a memory barrier. > > At least in the Linux kernel and also in glibc for mutexes locks are just > plain > function call

Re: -fno-tree-cselim not working?

2007-10-26 Thread Andi Kleen
"Richard Guenther" <[EMAIL PROTECTED]> writes: > > I hope we're not trying to support such w/o volatile counter. Whatever > POSIX says, this would pessimize generic code too much. It is dubious this transformation is an optimization at all for memory. e.g. consider the case counter is not in ca

RE: Creating a live, all-encompassing architectural document for GCC

2007-10-26 Thread Eric Weddington
> -Original Message- > From: Diego Novillo [mailto:[EMAIL PROTECTED] > Sent: Friday, October 26, 2007 11:10 AM > To: gcc@gcc.gnu.org > Subject: RFC: Creating a live, all-encompassing architectural > document for GCC > > > It should be easy for an individual maintainer (or even user)

Re: problem with iv folding

2007-10-26 Thread DJ Delorie
> you cannot add two pointers. Please create a PR for this and assign it > to me. Done, pr 33915 Note that m32c-elf needs --with-newlib Thanks!

Re: GCC 4.3 release schedule

2007-10-26 Thread Martin Michlmayr
* Joe Buck <[EMAIL PROTECTED]> [2007-10-26 11:44]: > You might want to hold off on investing the work in fixing those 550 > packages, because I think it's premature to consider the header > "cleanup" final. > > Can you estimate how many of the broken packages use > or ? Sorry I wasn't being clea

Re: GCC 4.3 release schedule

2007-10-26 Thread Janis Johnson
On Fri, 2007-10-26 at 19:54 +0200, Eric Botcazou wrote: > > When I look at the Build status page I see no one has posted a result > > there for GCC 4.2.2 : > > > > Please see : http://gcc.gnu.org/gcc-4.2/buildstat.html > > Here are a couple of posts by Kaveh: > http://gcc.gnu.org/ml/gcc-testre

Re: GCC 4.3 release schedule

2007-10-26 Thread Eric Botcazou
> I added more entries to gcc-4.2/buildstat.html. > > Bootstrap and test results for 4.2.2: > > i686-pc-linux-gnu (Slackware 12.0, kernel 2.6.22, glibc 2.5) > > Test results for 4.2.2: > > hppa2.0w-hp-hpux11.11 > hppa64-hp-hpux11.11 > hppa-unknown-linux-gnu > i386-unknown-freebsd5.5 > i

Re: GCC 4.3 release schedule

2007-10-26 Thread Andrew MacLeod
Mark Mitchell wrote: Andrew MacLeod wrote: we can at least make projected dates known so we have something firmer than "at some point in the future" :-) As RM, I try to take into account what I know about when distributors will be applying effort, but I must absolutely avoid in any wa

Re: Creating a live, all-encompassing architectural document for GCC

2007-10-26 Thread Diego Novillo
On 10/26/07, Eric Weddington <[EMAIL PROTECTED]> wrote: > > It certainly meets the navigable requirement. I'm sure all of you have seen > other examples as well. Thanks. I'll take a look. > > But you also want the user to be able to change an inter

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Florian Weimer
* Andrew Haley: > The core problem here seems to be that the "C with threads" memory > model isn't sufficiently well-defined to make a determination > possible. You're assuming that you have no resposibility to mark > shared memory protected by a mutex as volatile, but I know of nothing > in the

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Daniel Jacobowitz
On Fri, Oct 26, 2007 at 02:24:21PM -0700, Ian Lance Taylor wrote: > What do people think of this patch? This seems to fix the problem > case without breaking Michael's case. It basically avoids store > speculation: we don't write to a MEM unless the function > unconditionally writes to the MEM an

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Diego Novillo
On 26 Oct 2007 14:24:21 -0700, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > What do people think of this patch? This seems to fix the problem > case without breaking Michael's case. It basically avoids store > speculation: we don't write to a MEM unless the function > unconditionally writes to

Re: -fno-tree-cselim not working?

2007-10-26 Thread Ian Lance Taylor
Andrew Haley <[EMAIL PROTECTED]> writes: > Ian Lance Taylor writes: > > > As I understand it, the draft C++0x memory model has acquire release > > semantics for annotated variables. Of course, it wouldn't help the > > originalk test case unless the global variable was annotated. > > Mmm, but

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Ian Lance Taylor
Michael Matz <[EMAIL PROTECTED]> writes: > Both, the assessment of far-stretchedness and these numbers seem to be > invented ad hoc. The latter is irrelevant (it's not interesting how many > cases there are, but how important those cases which occur are, for some > metric, let's say performanc

Re: How widely used are and ?

2007-10-26 Thread Marcus Meissner
On Thu, Oct 25, 2007 at 09:40:06PM -0700, Joe Buck wrote: > The thread arguing about this has gone on for a while, so I think > it's time to gather some data to answer the question of just how bad > it will be if we accept the decision to move ext/hash_set and ext_hash_map > into a different direct

Re: GCC 4.3 release schedule

2007-10-26 Thread Joe Buck
On Fri, Oct 26, 2007 at 10:28:35PM +0200, Martin Michlmayr wrote: > * Joe Buck <[EMAIL PROTECTED]> [2007-10-26 11:44]: > > You might want to hold off on investing the work in fixing those 550 > > packages, because I think it's premature to consider the header > > "cleanup" final. > > > > Can you e

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Ian Lance Taylor
"Diego Novillo" <[EMAIL PROTECTED]> writes: > On 26 Oct 2007 14:24:21 -0700, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > > > What do people think of this patch? This seems to fix the problem > > case without breaking Michael's case. It basically avoids store > > speculation: we don't write to

Re: Optimization of conditional access to globals: thread-unsafe?

2007-10-26 Thread Jakub Jelinek
On Fri, Oct 26, 2007 at 02:24:21PM -0700, Ian Lance Taylor wrote: > What do people think of this patch? This seems to fix the problem > case without breaking Michael's case. It basically avoids store > speculation: we don't write to a MEM unless the function > unconditionally writes to the MEM an

  1   2   >