|Processor specific optimisations firstname.lastname@example.org (MickaŽl Pointier) (2002-01-17)|
|Re: Processor specific optimisations email@example.com (Peter H. Froehlich) (2002-01-18)|
|Re: Processor specific optimisations firstname.lastname@example.org (Dave Hudson) (2002-01-18)|
|Re: Processor specific optimisations email@example.com (2002-01-18)|
|Re: Processor specific optimisations firstname.lastname@example.org (2002-01-18)|
|Re: Processor specific optimisations email@example.com (Walter Banks) (2002-01-24)|
|Re: Processor specific optimisations firstname.lastname@example.org (2002-01-24)|
|[10 later articles]|
|From:||"MickaŽl Pointier" <email@example.com>|
|Date:||17 Jan 2002 00:34:57 -0500|
|Organization:||ImagiNET / Colt Internet|
|Posted-Date:||17 Jan 2002 00:34:57 EST|
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 ?
Return to the
Search the comp.compilers archives again.