[LLVMdev] Using annotation attributes

Bart Coppens Bart.Coppens at elis.ugent.be
Thu Jun 5 12:23:11 PDT 2008


On Thursday 05 June 2008 21:04, Tanya M. Lattner wrote:
> There is no way to get it from the Function*. You have to get the global
> annotations array and parse it yourself. You could easily write a pass to
> do this for you and store it in a map.
Ok, I will do that. In this context, is it possible that the code in
lib/Transforms/IPO/InlineSimple.cpp
has bitrotted somewhat? "Noinline" seems to reside in @llvm.global.annotations 
as well, but the code doesn't look like it is designed to handle that.

> I think the main reason is that we don't want to bloat the IR by making
> space for annotations in the Function itself.
Right. I had just hoped that even though the link is not explicit in the IR, 
it would have been preprocessed anyway (given the existence of 
AnnotationManager).

Bart



More information about the llvm-dev mailing list