[flang-commits] [flang] [mlir] [mlir][LLVM] Add LLVM::getLoopAnnotationAttrName() (PR #224060)
Krzysztof Drewniak via flang-commits
flang-commits at lists.llvm.org
Wed Sep 16 13:49:32 PDT 2026
================
@@ -114,4 +114,16 @@ verifyModuleFlagValue(StringAttr key, Attribute value,
#define GET_ATTRDEF_CLASSES
#include "mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.h.inc"
+namespace mlir {
+namespace LLVM {
+
+/// Canonical name used when attaching LoopAnnotationAttr as a discardable
+/// attribute on operations that do not declare it inherently.
+inline constexpr llvm::StringLiteral getLoopAnnotationAttrName() {
----------------
krzysz00 wrote:
Would it make sense to use the generated helper object you get from that discardable_attrs mechanism instead of setting things by name? (From what I remember, that gives you better type checking etc.)
https://github.com/llvm/llvm-project/pull/224060
More information about the flang-commits
mailing list