Re: CSE & compare/branch template problem

2009-12-26 Thread Paolo Bonzini
> There are some other quirks with the MicroBlaze architecture.
> The cmp/cmpu instructions only take a register.  Other instructions
> which can be used for equality or signed comparisons (xor or sub)
> can take an immediate operand.  I'll see how they can be added.

You can probably convince combine to merge the compare and branch
insns into a single pattern, that is immediately split to a
xor+branch-if-equal.

Paolo


in asm: where does ".zero 2102063220" come from?

2009-12-26 Thread Daniel Franke

Hi all.

I'm in the process of revamping the fortran-frontend to use trees instead of 
linked lists in its array-constructor representation (initial patch at [1]). 
By now, I'm hunting down the last regressions. For one regression, I have no 
idea how to deal with it.

The problem: for some reason the .o file for a small fortran program may be 
blown up to multiple GB. The diff below shows the differences in assembler of 
the testcase gfortran.dg/actual_array_substr_2.f90, once compiled with current 
trunk, once with my local tree. The only difference is the ".zero $bignumber" 
- it's not overly far fetched to link $bignumber with the object file size. 

It is to assume that I either dropped a required initialization or introduced 
one that should not be there. Simply reading the diff doesn't help me much as 
(a) it's rather big by now and (b) whenever I identified a candidate and put a 
breakpoint there, execution never actually stopped there ^^

Hints where these .zero lines are generated and why, where to put a breakpoint 
and what to look for -- or anything else that puts me on the right track --
would be appreciated.

Thanks

Daniel


--- actual_array_substr_2.s.orig2009-12-27 04:50:39.0 +0100
+++ actual_array_substr_2.s 2009-12-27 04:48:36.0 +0100
@@ -871,7 +871,9 @@
.type   teststring.1574, @object
.size   teststring.1574, 24
 teststring.1574:
+   .zero   12
.ascii  "abc def ghij"
+   .zero   2102025972
.ascii  "klm nop qrst"
.align 4
.type   m.1571, @object
@@ -903,7 +905,9 @@
.type   foostring.1518, @object
.size   foostring.1518, 24
 foostring.1518:
+   .zero   12
.ascii  "0123456789#$"
+   .zero   2102063220
.ascii  "$#9876543210"
-   .ident  "GCC: (GNU) 4.5.0 20091226 (experimental)"
+   .ident  "GCC: (GNU) 4.5.0 20091217 (experimental)"
.section.note.GNU-stack,"",@progbits



[1] http://gcc.gnu.org/ml/fortran/2009-12/msg00170.html


Re: in asm: where does ".zero 2102063220" come from?

2009-12-26 Thread Jerry DeLisle

Daniel Franke wrote:

Hi all.

I'm in the process of revamping the fortran-frontend to use trees instead of 
linked lists in its array-constructor representation (initial patch at [1]). 
By now, I'm hunting down the last regressions. For one regression, I have no 
idea how to deal with it.


The problem: for some reason the .o file for a small fortran program may be 
blown up to multiple GB. The diff below shows the differences in assembler of 
the testcase gfortran.dg/actual_array_substr_2.f90, once compiled with current 
trunk, once with my local tree. The only difference is the ".zero $bignumber" 
- it's not overly far fetched to link $bignumber with the object file size. 

It is to assume that I either dropped a required initialization or introduced 
one that should not be there. Simply reading the diff doesn't help me much as 
(a) it's rather big by now and (b) whenever I identified a candidate and put a 
breakpoint there, execution never actually stopped there ^^


Hints where these .zero lines are generated and why, where to put a breakpoint 
and what to look for -- or anything else that puts me on the right track --

would be appreciated.

Try to get a look at the -fdump-tree-original output.  This should happen long 
before any asm is generated.  Post it here if you are still stuck.


Regards,

Jerry


Re: MPC required in one week.

2009-12-26 Thread Silvius Rus
On Tue, Dec 1, 2009 at 2:25 AM, Paolo Bonzini  wrote:
>
> On 11/30/2009 09:47 PM, Michael Witten wrote:
>>
>> On Mon, Nov 30, 2009 at 12:04 AM, Kaveh R. GHAZI  
>> wrote:
>>>
>>> The patch which makes the MPC library a hard requirement for GCC
>>> bootstrapping has been approved today.
>>
>> Out of curiosity and ignorance: Why, specifically, is MPC going to be
>> a hard requirement?
>>
>> On the prerequisites page, MPC is currently described with: "Having
>> this library will enable additional optimizations on complex numbers."
>>
>> Does that mean that such optimizations are now an important
>> requirement? or is MPC being used for something else?
>
> They are a requirement for Fortran, but it's (much) simpler to do them for 
> all front-ends.
>
> Paolo
>

On the flip side, it's not necessarily easy to get it to work.  On my
build system, apt-get doesn't find it.  Downloading and installing the
.deb manually triggers 3 missing deps.
ftp://gcc.gnu.org/pub/gcc/infrastructure/ is unresponsive, so I had to
look around for the source.  Installing from source fails with a
libgmp abi message during configuration, so now I need to fiddle with
it.  Like many, I don't use fortran much, so this is pure overhead at
this point.

It could be just that my build system is such that it's more difficult
to bring in this change than is in the average case.  I'm not arguing
against change, especially when it brings improved performance, but I
think it's worth reinforcing that bringing in a library dependence is
not free.  (Looking at this issue oblivious of the maintenance and
development burden, it would have been nice to have a transitional
--no-mpc configure option.)

Silvius