AArch64: Make `build_ifn_call` accept array_slice or initializer_list
Improves flexibility for calling AArch64 NEON intrinsics, reducing temporary object creation.
The build_ifn_call helper function on AArch64 has been enhanced to accept array_slice and std::initializer_list for its arguments. This allows arguments to be stored on the stack rather than requiring heap allocation of a vector, improving efficiency and simplifying call sites. This change also fixes related call sites that were previously broken by this modification.
In Details
The build_ifn_call helper in aarch64-neon-builtins-base.cc previously required a vec<tree>& for its arguments, necessitating heap allocation. This commit modifies it to accept a const array_slice<const tree>& and adds an overload for std::initializer_list<const tree>. This change allows arguments to be passed more efficiently from the stack and simplifies integration with gimple_build_call_internal and other intrinsic-building functions.
- array_slice
- A C++ construct representing a contiguous view over an array, without owning the underlying data. Useful for passing ranges of elements efficiently.
- initializer_list
- A C++ standard library type that allows a function to accept a variable number of arguments of the same type, initialized using brace-enclosed lists.
- NEON
- ARM's advanced SIMD (Single Instruction, Multiple Data) architecture extension, providing vector processing capabilities.
- gimple
- GCC's internal representation for the middle-end of the compiler. It's a three-address code form that simplifies various optimizations.