Hello Chris The general concept is to replace void with {}. Void is a weird type in>> that it is only allowed as the return value of functions and as the type of >> instructions like store. It seems better (though also not particularly >> high priority) to eliminate it to make the type system more consistent. >> >MVT::isVoid and Type::VoidTyID (getVoidTy) have equivalent relation in LLVM. I am wondering to know whether the relation becomes MVT::isVoid corresponding to { } If eliminating void type? Thanks a lot Mitnick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120423/46ee0e57/attachment.html>
On Apr 23, 2012, at 5:57 AM, Lyu Mitnick wrote:> Hello Chris > >> The general concept is to replace void with {}. Void is a weird type in that it is only allowed as the return value of functions and as the type of instructions like store. It seems better (though also not particularly high priority) to eliminate it to make the type system more consistent. > > MVT::isVoidMVT is separate from the LLVM IR type system, I would not change it.> and Type::VoidTyIDVoidTyID should go away, since there is no more distinct Void type anymore.> (getVoidTy) have equivalent relation in LLVM.For API continuity, Type::getVoidTy() should still exist, but it should return {}. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120423/d20eec31/attachment.html>
Hello, The attachment is a patch which eliminate the "void" type only in lib/VMCore. I can build libLLVMCore.a successfully. However this patch didn't involve necessary modification of the other part of LLVM. I am wondering to know whether the modification is exactly what we want in eliminating the "void" type? I would like to use this patch as a starting point to eliminate the "void" type in LLVM. And I have some questions as follows: (1) What is the API of ReturnInst constructor if eliminating the void type? (2) I would like to eliminate void type progressively in LLVM. Is there any method to test each library of LLVM part by part? Thanks a lot Mitnick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120425/bd582807/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: eliminate_void.patch Type: application/octet-stream Size: 7246 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120425/bd582807/attachment.obj>