[LLVMdev] Code generation problem

Nick Lewycky nicholas at mxc.ca
Wed Feb 10 22:38:38 PST 2010


Duncan Sands wrote:
> Hi Russell,
>
>>    br i32 1, label %1, label %6
>
> if you build LLVM with checking enabled, then you would not have been able to
> create this bogus branch instruction: the BranchInst constructors assert if the
> condition does not have type i1.
>
> This does raise a philosophical question though: should the verifier try to
> catch mistakes that constructors would catch if assertions are turned on?

Yes, absolutely. In my ideal world you would be able to build a 
Release-Asserts LLVM and load a .bc file and run it through the verifier 
and have it catch any invalid or malformed bitcode.

Nick

>
> Ciao,
>
> Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list