|How to verify that optimizations preserve semantics linuxkaffee_@_gmx.net (Stephan Ceram) (2010-05-11)|
|Re: How to verify that optimizations preserve semantics email@example.com (=?ISO-8859-1?Q?Bj=F6rn_Franke?=) (2010-05-12)|
|Re: How to verify that optimizations preserve semantics firstname.lastname@example.org (Stefan Monnier) (2010-05-12)|
|Re: How to verify that optimizations preserve semantics email@example.com (Jeremy Wright) (2010-05-13)|
|Re: How to verify that optimizations preserve semantics firstname.lastname@example.org (Tom Crick) (2010-05-13)|
|Re: How to verify that optimizations preserve semantics email@example.com (Walter Banks) (2010-05-14)|
|Re: How to verify that optimizations preserve semantics firstname.lastname@example.org (BGB / cr88192) (2010-05-14)|
|From:||Stefan Monnier <email@example.com>|
|Date:||Wed, 12 May 2010 10:50:36 -0400|
|Posted-Date:||12 May 2010 17:12:37 EDT|
> I was wondering how compiler optimisations can be verified,
> i.e. whether they perform always valid code modifications? How is it
> done in practice?
AFAIK, it's mostly not done.
One of the easiest way to do it is try hard to split the optimization
into a first phase that analyzes the problem and comes up with a plan,
and a second phase that executes the plan, in such a way that most of
the complexity is in the first phase. So the verification can be done
by checking only the plan and the "executioner".
I.e. try as much as possible to perform your optimization by a complex
analysis&heuristic that ends up performing simple rewrite steps, so that
overall correctness only depends on the correctness of the simple
rewrite steps and not on the correctness of the complex
Return to the
Search the comp.compilers archives again.