Remove path-splitting pass, deprecate -fsplit-paths
GCC removes the path-splitting optimization pass and deprecates its associated flag due to negative interactions with other optimizations.
The pass_split_paths optimization pass, which duplicated loop bodies to optimize control flow, has been removed from GCC. This pass often interfered with crucial optimizations like loop unrolling and if-conversion by duplicating code before common subexpression elimination and other passes could run. The associated -fsplit-paths option is now deprecated and does nothing, though it is still accepted for backward compatibility.
In Details
The pass_split_paths pass aimed to improve instruction-level parallelism by duplicating basic blocks in IF-THEN-ELSE structures feeding into loop latches. However, its heuristic-driven approach frequently hindered subsequent optimizations such as load commoning and if-conversion, and could negatively impact loop unrolling. Its removal and the deprecation of -fsplit-paths simplify the optimization pipeline and resolve issues reported in PR120892, while retaining param_max_jump_thread_duplication_stmts for shared use.
- pass_split_paths
- An optimization pass in GCC that duplicates basic blocks in control flow graphs to improve instruction scheduling, particularly around loop constructs. It has been removed due to negative interactions with other optimization passes.
- -fsplit-paths
- A GCC command-line option that enabled the path-splitting optimization pass. This option is now deprecated and has no effect.
- if-conversion
- An optimization technique that transforms conditional branches into predicated instructions, allowing for more straightforward instruction scheduling and execution.
- loop unrolling
- An optimization that replicates the body of a loop multiple times to reduce loop overhead and increase instruction-level parallelism.
- common subexpression elimination
- An optimization that identifies and eliminates redundant computations of the same expression within a program.