[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:26 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
----------------
nikic wrote:

We shouldn't list things here. Instead, if the used intersection rule for an attribute is non-obvious, add a comment next to the definition to explain it.

https://github.com/llvm/llvm-project/pull/109719


More information about the llvm-commits mailing list