[all-commits] [llvm/llvm-project] c2cb49: [mlir][remarks] Add support for Attributes in Rema...
Razvan Lupusoru via All-commits
all-commits at lists.llvm.org
Fri Dec 5 09:25:54 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c2cb493824251432184cd9dfafb09fcfbcce6d28
https://github.com/llvm/llvm-project/commit/c2cb493824251432184cd9dfafb09fcfbcce6d28
Author: Razvan Lupusoru <razvan.lupusoru at gmail.com>
Date: 2025-12-05 (Fri, 05 Dec 2025)
Changed paths:
M mlir/include/mlir/IR/Remarks.h
M mlir/lib/IR/Remarks.cpp
M mlir/unittests/IR/RemarkTest.cpp
Log Message:
-----------
[mlir][remarks] Add support for Attributes in Remark Args (#170882)
Extend Remark::Arg to optionally store the original Attribute when
constructed from one. This allows custom remark streamers to access the
underlying attribute for type-specific handling, rather than being
limited to the string representation.
For example, a streamer processing an ArrayAttr argument can iterate
over its elements, or a streamer can check the specific attribute type
to apply custom formatting.
Changes:
- Add std::optional<Attribute> member to Remark::Arg
- Update Arg(StringRef, Attribute) constructor to store the attribute
- Add hasAttribute() and getAttribute() accessors
- Add unit test for Arg with ArrayAttr
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list