vect: Change IV increment position to standard_iv_increment_position
Vectorizer adjusts loop IV increment to support loop-variant increments.
The GCC vectorizer has been updated to consistently use standard_iv_increment_position for loop control. This change moves the induction variable (IV) increment to the end of the loop body. This adjustment is crucial for enabling future support for loop-variant increments, allowing for more flexible and potentially optimized loop structures.
In Details
The vectorizer pass (tree-vect) has standardized the placement of the induction variable (IV) increment. Functions like vect_set_loop_controls_directly and vect_update_ivs_after_vectorizer_for_early_breaks now use standard_iv_increment_position instead of vect_iv_increment_position. This moves the IV increment to occur after the loop body's vectorization, a prerequisite for supporting loop-variant increments later.
- Vectorizer
- A compiler component that transforms loops to execute instructions in parallel on multiple data elements simultaneously, often utilizing SIMD instructions.
- Induction Variable (IV)
- A variable in a loop whose value changes predictably with each iteration, typically used for loop control or array indexing.
- Loop-Variant Increment
- An increment value for a loop's induction variable that changes during the execution of the loop itself, rather than being constant for all iterations.