This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: GCC: Inefficient register usage?


I have noticed a definite worsening of gcc's optimisation for the m68k
target (and related targets such as ColdFire) since the EGCS initiative,
i.e. versions since 2.8. I guess it is due to reworkings of the gcc
internals to produce better code for the Pentiums and Sparcs. I remember one
large piece of work in the early days of EGCS was the "Haifa scheduler". I
don't know what it effect it might have had, but something like that may be
the cause of the deterioration in 68k optimisation.

I wonder if there is any switch to revert to older behaviour. Any GCC gurus
out there able to comment?

--
Mark Powell, Senior Software Engineer, Primagraphics Limited
New Cambridge House, Litlington, nr.Royston, Herts, SG8 0SS, UK
Tel. +44 1763 852222, Fax. 853324, http://www.primagraphics.co.uk



> -----Original Message-----
> From: crossgcc-owner@sources.redhat.com
> [mailto:crossgcc-owner@sources.redhat.com]On Behalf Of Christopher Bahns
> Sent: 25 August 2000 08:48
> To: crossgcc@sourceware.cygnus.com
> Subject: GCC: Inefficient register usage?
> Importance: High
>
>
> Hello again folks,
>
> It seems that GCC is generating unnecessary instructions to perform
> rather simple operations. A simple bitwise-or operation generates three
> instructions (12 bytes), compared to one instruction (6 bytes, I assume)
> generated by the Microtec Research (MRI) compiler. I suspect that this
> is at least part of the reason I'm seeing a 17% increase in machine code
> output size when going from MRI to GNU/GCC. I also fear that this makes
> the code a bit slower. I just don't understand why GCC is doing this in
> situations that appear to be obvious opportunities to save some space
> (and improve performance as well?).
>
>
> Here is my environment:
> Windows NT 4.0 Workstation (sp6a)
> Cygnus Cygwin 1.1.2
> binutils-2.10
> gcc-2.95.2
> newlib-1.8.2
> Target: m68k-coff
[ cut ]


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]