aarch64: Prefer full-vector SVE loops for hip12 core
Configures the aarch64 hip12 core to prefer full-vector SVE loops for better performance.
For the hip12 core, this change modifies the compiler’s behavior to prefer full-vector SVE loops over partially-masked ones. This optimization addresses performance regressions observed on hip12 when using WHILELO loops, where register dependencies between WHILELO computation and subsequent load instructions hindered performance. By setting param_vect_partial_vector_usage to 1, the compiler will now generate full-vector main loops, improving instruction-level parallelism and throughput.
In Details
This commit tunes the AArch64 backend for the hip12 core by adjusting the vectorization strategy. Specifically, it modifies aarch64_override_options_internal to set param_vect_partial_vector_usage to 1. This change promotes the use of full-vector SVE loops, particularly for WHILELO constructs. Performance testing indicated that on hip12, the dependency chain created by partially-masked WHILELO loops led to poor instruction issue rates. Generating full-vector loops mitigates this by reducing register pressure and enabling better pipeline utilization.
- SVE
- Scalable Vector Extension. An instruction set architecture extension for ARM processors that allows vector registers to have a variable length, adapting to different hardware implementations.
- WHILELO
- A predicate instruction in SVE that generates a sequence of predicated loop control instructions. It's used for creating loops where the iteration count is determined dynamically.
- hip12
- Likely refers to a specific AArch64 core or microarchitecture, possibly from Huawei, for which performance tuning is being applied.
- vectorization
- The process of converting scalar operations (operating on single data items) into vector operations (operating on multiple data items simultaneously) to improve performance.