Optimisation from assembler output

kh@wg.icl.co.uk (Kevin Hughes)
Tue, 14 Nov 1995 11:00:54 GMT

          From comp.compilers

Related articles
Optimisation from assembler output kh@wg.icl.co.uk (1995-11-14)
| List of all articles for this month |

Newsgroups: comp.compilers
From: kh@wg.icl.co.uk (Kevin Hughes)
Keywords: assembler, optimize, question, comment
Organization: International computers limited (West Gorton)
Date: Tue, 14 Nov 1995 11:00:54 GMT

This is probably a dumb questions but.... Is it sensible to optimise
simplistic assembler output from a compiler rather than build a
complex optimiser into the compiler? If so does one exist for SPARC?


The question is prompted by recent examination of the assembler
output from the g++ compiler. I was disappointed as I could, without
much effort, greatly improve the code due to poor register tracking,
missed common subexpression elimination and worst of all pointless
introduction of temporaries (constructors). If these could be
eliminated I think there would be around half? the instructions.


Any help much appreciated


Kevin
[Depends on what kinds of optimizations you want to do. Peephole opts are
always done on something pretty close to assembler, other kinds of opts need a
higher level representation. For G++ I'd think it'd be better to work at
a higher level than assembler so the work you do is applicable to more than
one platform. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.