[LLVMdev] Build Attributes Proposal

Renato Golin renato.golin at arm.com
Sat Nov 13 09:16:55 PST 2010


On 13 November 2010 15:12, Duncan Sands <baldrick at free.fr> wrote:
> I agree that it's limited.  As for MC, it will need to handle these strings
> anyway since this is an existing LLVM feature (coming from gcc originally)
> that needs to be supported.

Do you mean that LLVM-GCC generates build attributes as asm strings in IR?


> Because magic globals need magic treatment, i.e. special logic in the code
> generators etc.  Why add all this new stuff if an existing feature will do?

Build attributes are not asm specific, and implementing them in an asm
specific keyword seems kludge to me. Not to mention that you lock the
IR in a ARM-GNU-ASM specific mode, which is a dead-end. Also, passing
".build_attribute" strings in IR if you're producing ELF doesn't make
sense, IMO.

In a global array, the indexes are represented directly, only leaving
the associated string if additional information is necessary (like CPU
name, which is already a string).

cheers,
--renato




More information about the llvm-dev mailing list