[llvm] [LLVM][Intrinsics] Reduce stack size for `Intrinsic::getAttributes` (PR #152219)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 07:08:31 PDT 2025
================
@@ -652,53 +652,61 @@ static constexpr uint16_t IntrinsicsToAttributesMap[] = {)";
AttributeList Intrinsic::getAttributes(LLVMContext &C, ID id,
FunctionType *FT) {)";
+ // Find the max number of attributes to create the local array.
+ unsigned MaxNumAttrs = 0;
+ for (const auto [IntPtr, UniqueID] : UniqAttributes) {
+ const CodeGenIntrinsic &Int = *IntPtr;
+ unsigned NumAttrs =
+ llvm::count_if(Int.ArgumentAttributes,
+ [](const auto &Attrs) { return !Attrs.empty(); });
----------------
jurahul wrote:
Resolving.
https://github.com/llvm/llvm-project/pull/152219
More information about the llvm-commits
mailing list