Related articles |
---|
Processor specific optimisations mpointie@eden-studios.fr (Mickaël Pointier) (2002-01-17) |
Re: Processor specific optimisations pfroehli@ics.uci.edu (Peter H. Froehlich) (2002-01-18) |
Re: Processor specific optimisations dave@cyclicode.net (Dave Hudson) (2002-01-18) |
Re: Processor specific optimisations rickh@capaccess.org (2002-01-18) |
Re: Processor specific optimisations usenet@gehre.org (2002-01-18) |
Re: Processor specific optimisations walter@bytecraft.com (Walter Banks) (2002-01-24) |
Re: Processor specific optimisations jgd@cix.co.uk (2002-01-24) |
[10 later articles] |
From: | "Mickaël Pointier" <mpointie@eden-studios.fr> |
Newsgroups: | comp.compilers |
Date: | 17 Jan 2002 00:34:57 -0500 |
Organization: | ImagiNET / Colt Internet |
Keywords: | optimize, question |
Posted-Date: | 17 Jan 2002 00:34:57 EST |
Hi.
I would like to know if it's possible for a C compiler to
generate a decent assembly code for each and
every kind of processors.
So far, all the optimisations I've see are in one of the
following two categories:
1) AST optimisations (common subexpressions displacement,
removal of unused code, replacement of computations
by faster/smaller equivalents, and so on)
2) backend optimisations (cpu instructions reordering, register
allocation strategy, code inlining, etc...
Now, I wonder how it's possible to obtain a good result for processors
like the "good" old 6502 where most optimisations tricks are based on
dealing with zero page accessing, wrap around tricks with index
registers, self modifying code (for RAM based code), alligment of data
on page boudaries, and so on.
I ask this question because for the moment all the C (cross) compiler
that have been retargeted for the 6502 (CC65, LCC65, Quetzalcoatl,
...) produce code that is at best "bad". When I write "bad", I mean
that I usually manage to recode the same routine with a speed up
between x4 and x20 :'(
So, the question finaly is: Is it possible to apply the modern
compiler optimisation strategies to this old processor and have a
result that an experimented 6502 assembly coder would have a hard time
to beat ?
Mickael Pointier
Return to the
comp.compilers page.
Search the
comp.compilers archives again.