[LLVMdev] Correctness of Optimization Phases

Aaron Gray angray at beeb.net
Tue Jul 18 16:03:06 PDT 2006


>> 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.

Prooving correctness of a compiler is really an NP problem. This goes for 
any compiler backend. All you can do is have enough test cases.

Aaron




More information about the llvm-dev mailing list