This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Ray Pimm wrote: > > I am noticing suboptimal register allocation produced by gcc built for the > m68k-elf target. The best thing you can do is prepare as small a test case as possible that demonstrates the problem still applies to 3.2 and submit a gcc PR. > In some functions the compiler uses registers other than d0/d1/a0/a1, and > goes to the trouble of saving and restoring them to/from the stack, while > leaving unused one or more of d0/d1/a0/a1, when it could have achieved the > same result using only registers from the d0/d1/a0/a1 set. > > Then in other functions, it will use d0/d1/a0/a1 only. I cannot see any > pattern to the register allocation. > > I am using primarily gcc-2.95.3, but I notice that the same phenomenon > occurs on gcc-3.2. I generally use optimization level -O2, but higher > optimization levels do not seem to affect the result. > > My compiler options are as follows: > > CXXFLAGS = -O2 \ > -mcpu32 \ > -fno-exceptions \ > -fno-for-scope \ > -fshort-enums \ > -Wall \ > -Wno-uninitialized \ > -Wno-switch \ > > BTW, all of my code is C++, if this is relevant. > > Thanks - Ray Pimm > > ------ > Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ > Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com -- Joel Sherrill, Ph.D. Director of Research & Development joel@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985 ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |