Mail Archives: djgpp/1994/10/13/22:59:10
On Thu, 13 Oct 1994, Mike Collison wrote:
>
> > I was going over the asm output of a program and I came across this
> > little snippet:
>
> > movl %eax,-4(%ebp)
> > movl -4(%ebp),%eax
>
> One easy fix to the above
> problems would be to add peephole optimizations to the 386 machine description
> to catch these. The problem with this of course is the fact that there are
> many such examples and it would be difficult to catch every case.
I'm thinking of compiling to asm, running that through an asm optimizer
for the 80x86 and then finishing compilation. Problem is, the only asm
optimizer I know of (OptAsm) is commercial and most likely won't recognize
AT&T syntax. Hm... writing that kind of thing sounds interesting.
Anybody know where I might find some kind of theory on optimizations? :)
Kim
- Raw text -