nikic wrote: High level question: Are all of these really useful?
For parameter attributes, there are really two types, ones that are used to reason about calls, and ones used to reason about function definitions. I think the split here is something like: * readonly/readnone: Mostly used for calls. Since recently used for definitions in conjunction with noalias. * writeonly: Used for calls. * range, dereferenceable_or_null: Used for definitions. * align: Mostly used for definitions, but also used for intrinsic calls. * nonnull, dereferenceable: Mostly used for definitions. Used for calls in conjunction with noundef for "dominating conditions" in isKnownNonZero. Based on that breakdown, I can see some usefulness for propagating the readonly family, align and nonnull/dereferenceable. Is there anything that propagating range and dereferenceof_or_null is good for? I haven't checked how the latter is used in detail, but I'm pretty confident that we don't use call-site parameter range information for anything. https://github.com/llvm/llvm-project/pull/91101 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits