In the LLVM type system, union type is similar to the one in C/C++. In the implementation of llvm-gcc, a C union type is converted to a struct of one field that can hold all possible values of the union type and type casts are used to make the code manipulating the union type "well typed". This approach seems work very well, is there really a need to keep union type in LLVM? Is there a front-end emitting union type? Thanks, Neal -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100720/37dd3645/attachment.html>
Anton Korobeynikov
2010-Jul-20 08:36 UTC
[LLVMdev] Union type, is it really used or necessary?
> used to make the code manipulating the union type "well typed". This > approach seems work very well, is there really a need to keep union type in > LLVM?I think in its current state the unions should be removed from LLVM IR in next release. It's pretty much unfinished and noone is willing to work on them.> Is there a front-end emitting union type?Not that I'm aware of. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
On Jul 20, 2010, at 1:36 AM, Anton Korobeynikov wrote:>> used to make the code manipulating the union type "well typed". This >> approach seems work very well, is there really a need to keep union type in >> LLVM? > I think in its current state the unions should be removed from LLVM IR > in next release. It's pretty much unfinished and noone is willing to > work on them.I agree. -Chris
Seemingly Similar Threads
- [LLVMdev] Union type, is it really used or necessary?
- [LLVMdev] Union type, is it really used or necessary?
- [LLVMdev] Union type, is it really used or necessary?
- [LLVMdev] Union type, is it really used or necessary?
- [LLVMdev] Union type, is it really used or necessary?