|Compiler Optimizing assembler firstname.lastname@example.org (Werner Strydom) (1996-11-03)|
|Re: Compiler Optimizing assembler email@example.com (1996-11-03)|
|Re: Compiler Optimizing assembler firstname.lastname@example.org (1996-11-03)|
|Re: Compiler Optimizing assembler email@example.com (David L Moore) (1996-11-03)|
|Re: Compiler Optimizing assembler firstname.lastname@example.org (1996-11-05)|
|Re: Compiler Optimizing assembler Martin.Ward@durham.ac.uk (1996-11-05)|
|Re: Compiler Optimizing assembler email@example.com (K. Sridharan) (1996-11-07)|
|Re: Compiler Optimizing assembler firstname.lastname@example.org (Walter Banks) (1996-11-07)|
|Re: Compiler Optimizing assembler email@example.com (1996-11-10)|
|From:||firstname.lastname@example.org (David Keppel)|
|Date:||3 Nov 1996 13:08:46 -0500|
|Organization:||Computer Science & Engineering, U of Washington, Seattle|
|Keywords:||tools, optimize, assembler|
Werner Strydom <email@example.com> wrote:
>[Optimizing assembly code?]
A classic paper is
%A Christopher W. Fraser
%A Eugene W. Myers
%A Alan L. Wendt
%T Analyzing and Compressing Assembly Code
%J Proceedings of the ACM SIGPLAN 1984 Symposium on Compiler Construction
%J SIGPLAN Notices
%D June 1984
I know that Henry Massalin wrote a machine-code peephole optimizer for
the 68000 family for Synthesis in order to "fix up" things that
spanned code generation units. I don't believe there are any
published descriptions of the peephole optimizer itself, but he
reported to me (as I recall) that it took about 20 instructions to
consider a 3-instruction window, more to rewrite it.
Lots of modern assemblers have built-in optimizers. I believe that
some of them perform *simple* code motion/duplication across branches
(delay slot optimizations).
There is a body of work on decompilers, which take ASM and convert it
to abstract representation; in principle you can perform both
retrageting and optimization. I doubt any of them perform more
sophisticated loop transformations.
There is always the issue of whether any of your asm has "tricks" in
it that could break the optimizer strategy. For example a "table of
code" with a computed branch into the middle of the table.
Assembly *is* "just another programming language", so, in principle,
all of the standard optimizations should apply. For example, some
optimizing compilers convert loops to goto nests in the front end and
then transform them back to loops in the back end; you could
presumably just skip the front-end transformation.
;-D on ( Pessimizing humans ) Pardo
Return to the
Search the comp.compilers archives again.