[LLVMdev] Re: gcc like attributes and annotations
Chris Lattner
sabre at nondot.org
Wed Mar 1 11:41:04 PST 2006
On Fri, 24 Feb 2006, Reid Spencer wrote:
> In thinking about the "right" way to do this, I came up with the idea of
> a single "blob" of data that could be appended to a Module. This single
> "annotation" would always be ignored by LLVM, would not require
> significant additional space to construct,
If you're talking about a blob of binary data, which does not have
"pointers" into the LLVM code, this is fine. However, there is no reason
it needs to be stored "in" the BC format. It can live "next" to it in the
same file without impacting the bc format.
> and there is already a
> mechanism for constructing the information via the bytecode reader's
> handler interface (might need some extension).
Not clear. If you're having "pointers" from the blob into the LLVM code
(which I believe you would need for it to be useful), then the compiler
code that manipulates the LLVM IR has to be aware of these pointers, must
be able to update them when it makes changes, etc. This is extremely
nontrivial: exactly the same problem as full fledged annotations.
Additionally, the LLVM linker would have to know how to merge these blobs
of data (simple concatenation would be fine, more complex things probably
not).
> (JIT/storage/etc). The only question is: how do multiple tools avoid
> collision in this approach. Some kind of registry or partitioning of the
> data could likely solve that.
Also an issue.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list