[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 16 08:37:01 PDT 2024


goldsteinn wrote:

> I can see the argument for dereferenceable_or_null, but I don't see any way in which range will be useful.

Well I'd say if the callsite in the new inlined function gets inlined itself, we now have `range` info on that parameter we can optimize around. Further, if we ever get the attributor online IIRC it can add function parameters from the union of callsite arguments.

But the more salient point to me at least, is the general principal that we should try to reduce information loss in our transforms when possible. We don't know all the potential goals of either downstream users or other LLVM contributors working on far away parts of the code base, and shouldn't essentially preclude use cases we can keep open. 

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


More information about the cfe-commits mailing list