[clang] [llvm] [Clang][LLVM] Add -finline-stringops=memset and inline-stringops attribute (PR #231163)
Arth Srivastava via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 22 04:22:30 PDT 2026
Blazearth wrote:
>The LLVM IR attributes here look overly complicated. There's a very small list of operations which actually make sense to disable this way; we can just add a separate attribute for each such operation.
Hey @efriedma-quic thanks for the review! I've refactored the patch to use a dedicated `inline-memset` boolean attribute with the standard `setOR<InlineMemsetAttr>` merge rule, removing the custom attribute-merging logic.
>All attributes need to be documented in LangRef.
I've also documented the attribute in LangRef and updated the relevant tests.
I kept it separate from `no-builtin-memset` because disabling builtin recognition and requiring inline expansion have different semantics, and reusing the existing attribute could change code generation for current users.
https://github.com/llvm/llvm-project/pull/231163
More information about the cfe-commits
mailing list