[LLVMdev] Correctness of Optimization Phases

Misha Brukman brukman at cs.uiuc.edu
Tue Jul 18 14:57:36 PDT 2006


On Wed, Jul 19, 2006 at 03:09:44AM +0800, deveshti at comp.nus.edu.sg
wrote:
> I may sound stupid but can someone tell me that after applying
> optimization sequences randomly whether we can surely say that the
> final output is correct?

Answering this question is equivalent to solving the Halting Problem.
 
> I mean if we apply 12 options in random sequence provided by 'opt'
> command is the output is always correct  (i.e. program does the same
> thing and results are same as expected) ?
>
> Is it Yes by implemention of LLVM or we have to check everytime?

It is the intended effect that the output is always correct, but LLVM
has no proof of this happening.  Testing on lots and lots of programs
and inputs is what is currently done to find whether there are bugs.

-- 
Misha Brukman :: http://misha.brukman.net



More information about the llvm-dev mailing list