[LLVMdev] Named struct metadata (original) (raw)
Patrick Walton pwalton at mozilla.com
Sun Sep 4 17:26:00 PDT 2011
- Previous message: [LLVMdev] Problem with stack arguments
- Next message: [LLVMdev] Named struct metadata
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi everyone,
It'd be useful for our purposes if we could attach metadata to named structs. In particular, in Rust we're looking to use this information to communicate information about our discriminated unions to the garbage collector. (We could, and are at the moment, using the metadata argument to the gcroot intrinsic, but this seems to inhibit optimizations and adds a fair amount of noise to the generated IR, so we'd like to transition to an addrspace-based GC solution at some point.)
It seems to me that attaching metadata to named structs could generally be useful as a way to communicate additional ad-hoc type information to optimizers, codegen, etc., in much the same way as GCC and Clang use attribute on structs.
Does anyone have opinions as to whether this is a good idea?
Thanks, Patrick
- Previous message: [LLVMdev] Problem with stack arguments
- Next message: [LLVMdev] Named struct metadata
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]