[LLVMdev] Reverse Optimization?

John Regehr regehr at cs.utah.edu
Mon Dec 1 02:07:01 PST 2003


> I have been working on something along similar lines:
> translating Alpha machine code into LLVM.

Cool.  I'll be interested to see how this goes, please send mail to this
list when you have reportable results.

Transforming machine code in ways that leave its data layout intact is not
that hard, people have been doing this for a long time.  I'm particularly
interested in machine code transformations that change data layout.  This
appears to be difficult to do in a sound way since it boils down to alias
analysis of machine code, which boils down to something like type safety.
Consider, for example, a program that (possibly on purpose) overwrites a
return value on its own call stack.  It might make sense to bail out if
you can prove that a program does this, but it's not so easy to prove that
a program does not do this.  On the other hand, if you assume somewhat
well-behaved code that was produced by a compiler and where ptr accesses
are in bounds, the problem gets pretty easy again.

John Regehr




More information about the llvm-dev mailing list