Known regression ? gcc-4.0.0-20050312 FPE's on C++

2005-03-18 Thread John Vickers
Hi.
I'm just asking if this is a known bug.  If not I'll prepare a bug report,
with bzipped preprocessed source.
I'm seeing this:
hpm05fuvec0.cpp:5538: internal compiler error: Floating point exception
Please submit a full bug report,
quite often when compiling large chunks of machine-generated C++.
gcc-3.4.3 works fine on the same testcases.
The compiler is:
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../../sources/gcc-4.0-20050312/configure 
--enable-languages=c,c++ --enable-__cxa_atexit --disable-checking --disable-nls 
--prefix=/usr/local/gcc/gcc-4.0-20050312
Thread model: posix
gcc version 4.0.0 20050312 (prerelease)
The compiler was bootstrapped with gcc-3.4.3
I can have another go without the "--disable-checking" if that's likely to help.
Anything else you'd like in the bug report ?
gcc-4 is a lot faster at compiling templatey C++ than 3.4.3, but the 
compiled code performance
is sometimes better, sometimes worse.  It's a bit hard to tell, since our big 
testcases
currently ICE with FPE's on gcc-4.0.
Regards,
John.




Re: Using associativity for optimization

2014-12-02 Thread John Vickers
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[Apologies if I'm talking rubbish, or spamming folk with the obvious]

Such an optimisation would ideally be dependent on some estimate on
the register pressure for the relevant register class[es], and perhaps
on some heuristic estimate of the relative execution frequency.

As a standalone function on many RISC machines, register allocation
for foo() is free.  But if we inline foo() into a larger function,
register pressure and code fetch time become more important, perhaps
depending on whether the code is executed at most once per invocation,
or known to be executed a million times per invocation.

John.

On 02/12/14 10:23, Richard Biener wrote:
> On Tue, Dec 2, 2014 at 12:11 AM, shmeel gutl 
>  wrote:
>> While testing my implementation of passing arguments in
>> registers, I noticed that gcc 4.7 creates instruction
>> dependencies when it doesn't have to. Consider:
>> 
>> int foo(int a1, int a2, int a3, int a4) { return a1|a2|a3|a4; }
>> 
>> gcc, even with -O2 generated code that was equivalent to
>> 
>> temp1 = a1 | a2; temp2 = temp1 | a3; temp3 = temp2 | a4;
>> 
>> return temp3;
>> 
>> This code must be executed serially.
>> 
>> Could I create patterns, or enable optimizations that would cause
>> the compiler to generate
>> 
>> temp1 = a1 | a2; temp2 = a3 | a4; temp3 = temp1 | temp2;
>> 
>> Thereby allowing the scheduler to compute temp1 and temp2 in
>> parallel.
> 
> You can tune it with --param tree-reassoc-width=N, not sure if
> that was implemented for 4.7 already.
> 
> Richard.
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJUfdQ2AAoJEOFemvuvogvZI7cP+gKv+q2ZHlPADVfdU+jK4CRK
RjLtCsfhj216l7mCFB6Gx5FMNExOYkwK3I9r8Da7TC/o/zDAAHX3aqhWFy64/JGW
o1dCZd8Cr1fwTvqM6jWKjcY1ddkdDsPLA2rHG0GZGn6VQWWdyvfpTFNjG8VK4KBl
GO01bcvcHJ88pwQQd2q/4FrFcTcBgdEZO7IfBgTeTEfZDdWPBe9+fWPXvqHoHZRM
ti74fe/8K39SUopVPrBqkgUPXs4iGwNg0VLoRQhRoYeuiruexzXCDAl0j4MuihAD
A4ssrp+CJV6gf7hPiZCm6T8p0XN3+W1UB9xTrn055dujVK0/uSvYhjrR8c3HMx0M
4jRZG7+5tJqC45hEyHZ+m+cmtjIWGzVPevYv2pzH6lyzd8eFf4q+4VBDVdDQRT3s
4RkBosccVgj7CHn0/rVJfTa/ONQMNSikq1HUYeXJwg8Lclm929jXNRP/tEj37OH0
UibM38t+ZMwI0LvKhbQm4904ASFCi8qNTEN/c3VS86A0smMPlGX7OSq2k/IuEcRx
lDd4msu2/aRTIgunmEl2558wlSbOlxtO6jPjri5HdzTajaQSC9t5T3pmi+P+Y5R5
+6OPy/BFSVyqKXS+kPA0IyOFE2iBgbHHfTbtptzeN2Tk3eGm1Ssk20JBqhRBvZTt
/doeToTwibJ8ZDgF2Q/O
=CghE
-END PGP SIGNATURE-