[llvm-commits] [llvm] r72248 - in /llvm/trunk: lib/VMCore/Verifier.cpp test/Assembler/2009-05-22-CC.ll test/Verifier/2009-05-22-CC.ll

Duncan Sands baldrick at free.fr
Fri May 22 00:00:43 PDT 2009


Hi,

> Verify that calling conventions match function prototype.
> This only rejects mismatches between target specific calling convention
> and C/LLVM specific calling convention.
> There are too many fastcc/C, coldcc/cc42 mismatches in the testsuite, these are
> not reject by the verifier.

I think this is bogus: the IR is well-formed and so should pass
verification.  The verifier is not there to catch programmer
mistakes.  Another sign that the check is bogus is that it
distinguishes between direct and indirect calls.  Thus some IR
with an indirect call can be passed as valid, but a correct
optimization could turn it into a direct call, and all of a
sudden it doesn't pass the verifier any more!

If you want a "lint" pass to point out common mistakes people
make when writing IR, I think that would be great please go ahead!
But the verifier is IMHO something else.

Ciao,

Duncan.



More information about the llvm-commits mailing list