[llvm] [IR][Attribute] Add support for intersecting AttributeLists; NFC (PR #109719)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 12:49:27 PDT 2024
================
@@ -22,290 +22,323 @@ def ParamAttr : AttrProperty;
/// Can be used as return attribute.
def RetAttr : AttrProperty;
+
+
+/// Intersection rules. Used for example in sinking/hoisting two
+/// callbases to find a set of attributes that apply to both.
+/// Note, there are some attributes we can (probably) legally drop
+/// but are intentionally excluded as of now. Those include:
+/// - initializes
+/// - allockind
+/// - allocsize
+/// - minsize
+/// - optsize
+/// - optnone
+/// - optdebug
+/// - optforfuzzing
+///
+/// When intersecting the attributes must both present and equal.
+/// Use this for attributes you are not certain it is safe to drop
----------------
nikic wrote:
```suggestion
/// Use this for attributes it is not safe to drop
```
I don't think we need to imply uncertainty here...
https://github.com/llvm/llvm-project/pull/109719
More information about the llvm-commits
mailing list