.
Again, thanks for your patience.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Tue, 2007-11-06 at 09:32 -0800, Joe Buck wrote:
> On Wed, Nov 07, 2007 at 04:06:11AM +1100, skaller wrote:
> > On Tue, 2007-11-06 at 07:49 -0800, Joe Buck wrote:
> > > Now it appears that you want to make some kind of intermediate assumption
> > > (semi-strict al
quite
surprised, this is very hard to get right.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Tue, 2007-11-06 at 07:49 -0800, Joe Buck wrote:
> On Wed, Nov 07, 2007 at 02:30:44AM +1100, skaller wrote:
> Now it appears that you want to make some kind of intermediate assumption
> (semi-strict aliasing?), where pointers of different types are allowed to
> alias while ints
On Tue, 2007-11-06 at 09:37 -0500, Ross Ridge wrote:
> skaller writes:
> > Yes but I still don't understand. The claim was that the assignment
> > might modify p. This is is contra-indicated since p is a pointer
> > to an int, whereas the value being assigned is an i
On Tue, 2007-11-06 at 06:29 -0800, Ian Lance Taylor wrote:
> skaller <[EMAIL PROTECTED]> writes:
> I recommend that you just read the standard and see the real aliasing
> rules.
I don't care about that, I'm trying to discover what
-fno-strict-aliasing actually does.
Y
On Tue, 2007-11-06 at 00:15 -0800, Ian Lance Taylor wrote:
> skaller <[EMAIL PROTECTED]> writes:
>
> > On Mon, 2007-11-05 at 14:30 -0500, Ross Ridge wrote:
> >
> > > One example of where it hurts on just about any platform is something
> > > like
On Mon, 2007-11-05 at 14:30 -0500, Ross Ridge wrote:
> Ian Lance Taylor wrote:
> > Strict aliasing only refers to loads and stores using pointers.
>
> skaller writes:
> > Ah, I see. So turning it off isn't really all that bad
> > for optimisation.
>
>
On Mon, 2007-11-05 at 10:20 -0800, Joe Buck wrote:
> On Mon, Nov 05, 2007 at 10:15:55AM -0800, Ian Lance Taylor wrote:
> > skaller <[EMAIL PROTECTED]> writes:
> > > Ah, I see. So turning [strict aliasing] off isn't really all that bad
> > > for optimisation
On Mon, 2007-11-05 at 10:15 -0800, Ian Lance Taylor wrote:
> skaller <[EMAIL PROTECTED]> writes:
>
> > On Mon, 2007-11-05 at 09:56 -0800, Ian Lance Taylor wrote:
> > > skaller <[EMAIL PROTECTED]> writes:
> > >
> > > > Can someone tell me w
On Mon, 2007-11-05 at 09:56 -0800, Ian Lance Taylor wrote:
> skaller <[EMAIL PROTECTED]> writes:
>
> > Can someone tell me what optimisations might be enabled/disabled
> > by strict aliasing rules?
> Strict aliasing only refers to loads and stores using pointers.
A
impossible if
there is no default constructor).
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Sat, 2007-11-03 at 10:35 +0100, Sylvain Pion wrote:
> skaller wrote :
> > I can tell you I definitely considered using FS for the
> > Felix thread frame pointer to save passing that pointer
> > between every function..
>
> But then, won't you end up with an
On Fri, 2007-11-02 at 22:35 -0700, Ian Lance Taylor wrote:
> skaller <[EMAIL PROTECTED]> writes:
>
> > Neko, for example, uses a register. AFAIK MLton does the
> > same kind of thing. If gcc team thinks ANY register is free
> > to steal they'd be wrong -- th
On Fri, 2007-11-02 at 23:56 -0400, Robert Dewar wrote:
> skaller wrote:
> You really can't be serious in your comment about fs, if you
> understand the architecture ...
You're just not thinking the same way I am. A CPU has state,
the compiler and application program manage
On Fri, 2007-11-02 at 23:54 -0400, Robert Dewar wrote:
> skaller wrote:
> > On Fri, 2007-11-02 at 18:45 -0700, Andrew Pinski wrote:
> >>> This is not true. If you use a register for any purpose like this,
> >>> it can't be used for anything else and t
I know how the x86 works quite well .. perhaps unfortunately I've
written several major applications in x86 assembler (including
a complete text editor).
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Sat, 2007-11-03 at 12:27 +1100, skaller wrote:
> On Fri, 2007-11-02 at 10:29 -0700, Ian Lance Taylor wrote:
> Of course there is. It's called design by contract.
> I do it all the time. I am appalled at code bases like
> GTK and interfaces like OpenMP which get such real
parameter
bindings explicitly.
> OTOH, using thread-locals introduces
> "action at a distance", which never helps readability.
Yes.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
d be to use mmap() and an invalid
block: AFAIK that's what Ocaml does, so the young
heap allocator is a SINGLE register increment .. this
is rather fast .. :)
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Fri, 2007-11-02 at 20:00 +0100, Olivier Galibert wrote:
> On Sat, Nov 03, 2007 at 03:38:51AM +1100, skaller wrote:
> > My argument is basically: there is no need for any such
> > feature in a well written program. Each thread already has
> > its own local stack. Global va
On Fri, 2007-11-02 at 19:56 +0100, Olivier Galibert wrote:
> On Sat, Nov 03, 2007 at 03:31:14AM +1100, skaller wrote:
> > On Fri, 2007-11-02 at 07:39 -0700, Ian Lance Taylor wrote:
> > > I think you need to look at the TLS access code before deciding that
> >
On Fri, 2007-11-02 at 10:29 -0700, Ian Lance Taylor wrote:
> skaller <[EMAIL PROTECTED]> writes:
>
> > On Fri, 2007-11-02 at 07:39 -0700, Ian Lance Taylor wrote:
> > > skaller <[EMAIL PROTECTED]> writes:
> >
> > > In a C executable, TLS requires
lication) program needing TLS (other than the stack)
is automatically badly designed. I've been writing code for
three decades without using any global variables, ever since
I learned about re-entrancy.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Fri, 2007-11-02 at 07:39 -0700, Ian Lance Taylor wrote:
> skaller <[EMAIL PROTECTED]> writes:
> In a C executable, TLS requires one extra machine register.
You mean gcc?
> TLS
> variables are accessed via offsets from that register. So what's the
> significant d
On Thu, 2007-11-01 at 21:02 -0700, Gary Funck wrote:
> On Thu, Oct 18, 2007 at 11:42:52AM +1000, skaller wrote:
> >
> > DO you know how thread local variables are handled?
> > [Not using Posix TLS I hope .. that would be a disaster]
>
> Would you please elaborate?
l)
BTW: doesn't this suggest unrolling loops and recursions is
potentially expensive?
--
John Skaller
Felix, successor to C++: http://felix.sf.net
irs, which in protected mode requires a valid
segment descriptor.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Mon, 2007-10-29 at 10:37 +0100, Samuel Tardieu wrote:
> >>>>> "skaller" == skaller <[EMAIL PROTECTED]> writes:
> with (x86):
>
> movla, %eax
> cmpl$1, 4(%esp)
> sbbl$-1, %eax
> movl%eax,
On Sun, 2007-10-28 at 20:32 -0700, David Miller wrote:
> From: skaller <[EMAIL PROTECTED]>
> > That is the programmers fault, they should have accessed the
> > variable using a const. Failing to do so gives the compiler
> > permission to write speculatively.
>
&g
se write-protection exceptions.
That is the programmers fault, they should have accessed the
variable using a const. Failing to do so gives the compiler
permission to write speculatively.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
)&y;
[My Felix compiler does this cast systematically and deliberately]
--
John Skaller
Felix, successor to C++: http://felix.sf.net
topic of this discussion.
If this code mutually excludes other accesses to x, then it is
safe, and if it doesn't, then the programmer is responsible
for writing undefined behaviour, not the compiler.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
: return;
Since 'a' here is sharable, the function can assume it
is not aliased in a register, load and increment it
and store it back.
It doesn't matter then, whether there is a mutex or not.
In fact, it doesn't matter if locked is true or false.
I also can't see anything
codifies existing
practice and everyone makes the above assumptions.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
again (because the other thread is locked up).
OK .. hmm .. well this is the idea, but a more formal proof
would be cool.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Sat, 2007-10-27 at 12:54 +0200, Richard Guenther wrote:
> On 10/27/07, Robert Dewar <[EMAIL PROTECTED]> wrote:
> > skaller wrote:
> >
> > > So I am guessing the Felix version is lucky there are
> > > no gratuitous temporaries to be saved when this happe
On Fri, 2007-10-26 at 20:26 -0400, Robert Dewar wrote:
> skaller wrote:
>
> > So I am guessing the Felix version is lucky there are
> > no gratuitous temporaries to be saved when this happens,
> > and the C code is unlucky and there are.
> >
> > Maybe someo
On Fri, 2007-10-26 at 17:19 -0700, David Daney wrote:
> skaller wrote:
> > On Fri, 2007-10-26 at 14:24 -0700, Ian Lance Taylor wrote:
> >> Michael Matz <[EMAIL PROTECTED]> writes:
> >
> >> This is basically a public relations exercise. I doubt this
> &
gh the optimization has been there
> since gcc 3.4 and nobody noticed.
Most people didn't have multi-core processors then..
--
John Skaller
Felix, successor to C++: http://felix.sf.net
o knows how the optimiser works can comment?
--
John Skaller
Felix, successor to C++: http://felix.sf.net
x27;t see is a memory barrier for all addressable memory.
I would have thought it is the case iff the register aliasing
the variable is caller save rather than callee save according
to the ABI.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Fri, 2007-10-26 at 23:03 +0400, Tomash Brechko wrote:
> On Sat, Oct 27, 2007 at 03:06:21 +1000, skaller wrote:
> > And what do you do if you do not KNOW what the storage class is,
> > which is the case 99.99% of the time in C++ member functions?
>
> I'm not quite su
On Fri, 2007-10-26 at 19:41 +0100, Jonathan Wakely wrote:
> On 26/10/2007, skaller <[EMAIL PROTECTED]> wrote:
> > This would not be correct. When you deprecate C++2000 features,
> > you should retain them in such a way that a compiler switch
> > such as --std=C++2000
ll have more benefits and
be easier than using LP.
I like LP, but it is monolithic and invasive, and needs its
own tools (syntax colouring .. all gone :)
--
John Skaller
Felix, successor to C++: http://felix.sf.net
gruent in the predictions
made for observables.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
of the time in C++ member functions?
--
John Skaller
Felix, successor to C++: http://felix.sf.net
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
e compiler as non-conforming if 'a' isn't
set (or, if b IS set) .. but print statements are easier :)
Stick a user defined function in there, which itself isn't
observable .. and all bets are off again.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
nctions'.
What about plain old statements? Expressions?
Now you need to specify a calculus for these properties.
I think this idea is really hot .. it's so much simpler
and fine-grained that just having a mutex.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
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
l
and transient and associated with a mutex operation.
[BTW I think this sucks, the need to synchronise ALL memory
on mutexing is far too heavy]
--
John Skaller
Felix, successor to C++: http://felix.sf.net
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, what are they?
You
e price for tracking non-standard but desirable
or optional features.
I should point out retaining 'old' features can create a
significant maintenance burden for gcc developers, and as
such reduce the quality of the current and future implementations.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
t c++2000 directory?
[BTW: very glad to hear auto_ptr is leaving is. The LWG made
a total mess of my requirement and suggestion, the newer
classes finally provide the right thing .. thank you to the
new LWG members on that!]
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Thu, 2007-10-25 at 13:41 -0500, Gabriel Dos Reis wrote:
> On Fri, 26 Oct 2007, skaller wrote:
>
> |
> | On Thu, 2007-10-25 at 12:40 -0500, Gabriel Dos Reis wrote:
> |
> | > | I think this is the wrong idea. Deprecated does carry a lot
> | > | of weight. It allo
unfavourably, precisely because it *doesn't* imply
uncontrolled feature removal. Contrarily my point is that
they can be enabled or disabled with a small number
of comprehensible switches.
gcc already does this kind of thing and it is good,
although the exact features sets controlled by switch
co
On Thu, 2007-10-25 at 11:37 -0400, Robert Dewar wrote:
> skaller wrote:
>
> > I think this is the wrong idea. Deprecated does carry a lot
> > of weight. It allows a new compiler without a legacy
> > to elide the feature and specify it is ISO compliant
> > 'mi
y a --allow-deprecated-features type of switch.
Deprecation is a migration path -- isn't that what C++
is all about with respect to C?
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Tue, 2007-10-23 at 18:44 +0100, Dave Korn wrote:
> On 23 October 2007 18:25, skaller wrote:
>
> > In
> >
> >
> http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Explicit-Reg-Vars.html#Explicit-Re
> g-Vars
> >
> > it explains how to use register varia
when __builtin_frame_address(0) isn't
working .. on amd64 this:
register void *stack asm ("%rsp");
appears to work. Also this is the current stack pointer .. not
the frame pointer, which could be different.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
rk." I smell a request for enhancement...
So you and your compiler are off to a co-dependency workshop?
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Mon, 2007-10-22 at 22:58 -0700, Andrew Pinski wrote:
> On 10/22/07, skaller <[EMAIL PROTECTED]> wrote:
> > Unfortunately, this appears not to work if -fomit-frame-pointer
> > is used on an x86.
>
> What version of GCC? Since this was fixed for 4.1.0, see
&g
On Tue, 2007-10-23 at 00:00 -0400, Jason Merrill wrote:
> skaller wrote:
> > But Jason, the compiler worked properly in rejecting invalid syntax.
> > Now you're suggesting it fails to do so. This suggests a real regression
> > and a real bug: the new feature should have
genuine.
BTW: did WG21 already pass this proposal?
--
John Skaller
Felix, successor to C++: http://felix.sf.net
us, to have a way to get the stack
pointer that works even if -fomit-frame-pointer is specified.
Any comments? Is it a reasonable request?
BTW: what happens on ia64 which has two? stacks?
--
John Skaller
Felix, successor to C++: http://felix.sf.net
ushed. It also makes a fairly serious
mistake, in that the recursion calls the externally visible
function, which is ABI compliant. It should generate a non-recursive
wrapper, and then use a recursive inner function which uses
an optimal but not necessarily ABI compliant interface.
--
John Skaller
and thus make GCC thread-aware for this case?
Registers are a limited resource.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
d
messages out of order. What this means is if you want
to synchronise .. you have to write code to actually do
it, eg a double handshake... shared memory systems
do that kind of thing directly in hardware, so you can
sometime work at a much higher level.
--
John Skaller
Felix, succe
kernel which is better able to manage
things like cache synchronisation than a compiler.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
nother thread has not modified it since the last synchronisation.
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Sat, 2007-10-20 at 22:32 +0400, Tomash Brechko wrote:
> I'm not sure what OpenMP spec says about default data scope (too lazy
> to read through),
> but it seems that examples from
> http://kallipolis.com/openmp/2.html assume default(private), while GCC
> GOMP defaults to shared. In your case
On Thu, 2007-10-18 at 13:04 +0200, Jakub Jelinek wrote:
> On Thu, Oct 18, 2007 at 02:47:44PM +1000, skaller wrote:
> On LU_mp.c according to oprofile more than 95% of time is spent in the inner
> loop, rather than any kind of waiting. On quad core with OMP_NUM_THREADS=4
> all 4 thre
On Thu, 2007-10-18 at 06:00 -0700, Tim Prince wrote:
> skaller wrote:
> I don't know of any OpenMP compiler which would correct the nesting of
> parallel loops in your LU. I have assumed that OpenMP doesn't allow
> such optimization; you have to get it right yourself.
?
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Thu, 2007-10-18 at 12:02 +0800, Biplab Kumar Modak wrote:
> skaller wrote:
> > On Wed, 2007-10-17 at 18:14 +0100, Biagio Lucini wrote:
> >> skaller wrote:
> >
> >> It would be interesting to try with another compiler. Do you have access
> &
On Thu, 2007-10-18 at 11:18 +1000, skaller wrote:
> On Wed, 2007-10-17 at 10:09 -0700, Joe Buck wrote:
> > On Thu, Oct 18, 2007 at 03:00:02AM +1000, skaller wrote:
> > > Hi, I have just run and timed a couple of tutorial examples for
> > > openMP using gcc (GCC) 4.2.1 (
On Wed, 2007-10-17 at 10:09 -0700, Joe Buck wrote:
> On Thu, Oct 18, 2007 at 03:00:02AM +1000, skaller wrote:
> > Hi, I have just run and timed a couple of tutorial examples for
> > openMP using gcc (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4) on a dual core
> > Athlon amd64, with OMP
On Wed, 2007-10-17 at 10:09 -0700, Joe Buck wrote:
> On Thu, Oct 18, 2007 at 03:00:02AM +1000, skaller wrote:
> > Hi, I have just run and timed a couple of tutorial examples for
> > openMP using gcc (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4) on a dual core
> > Athlon amd64, with OMP
On Wed, 2007-10-17 at 18:14 +0100, Biagio Lucini wrote:
> skaller wrote:
> It would be interesting to try with another compiler. Do you have access
> to another OpenMP-enabled compiler?
Unfortunately no, unless MSVC++ in VS2005 has openMP.
I have an Intel licence but they're to
't run properly due to a missing .spec file,
so I couldn't check if it was any different]
--
John Skaller
Felix, successor to C++: http://felix.sf.net
On Mon, 2005-08-29 at 01:00 -0700, Ian Lance Taylor wrote:
> skaller <[EMAIL PROTECTED]> writes:
>
> > In gcc/g++ version 4.0 there is no way to turn off the
> > unused variable warning enabled by -Wall with a command
> > line switch.
>
> How about -Wno-un
lines .. (gcc provides lots of warnings :)
BTW: gcc/g++ 4.0 is one heck of a better compiler than
the 3.x series! Nice work!!
[Pls CC me as I don't subscribe to this list]
--
John Skaller
signature.asc
Description: This is a digitally signed message part
83 matches
Mail list logo