Hi all,
I’ve added a few attributes now to IR, and I’ve noticed that we can either use simple strings or define attributes in llvm/include/llvm/IR/Attributes.td, though doing so seemed to require much more boilerplate as I needed to additionally modify:
- llvm/include/llvm/AsmParser/LLToken.h
- llvm/include/llvm/Bitcode/LLVMBitCodes.h
- llvm/include/llvm/IR/Attributes.td
- llvm/lib/AsmParser/LLLexer.cpp
- llvm/lib/Bitcode/Reader/BitcodeReader.cpp
- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
- llvm/lib/Transforms/Utils/CodeExtractor.cpp
- llvm/test/Bitcode/attributes.ll
- llvm/include/llvm/IR/Attributes.td
Are there formal (explicit) recommendations documented anywhere on which are preferred and what the tradeoffs are?