path solver: Factor dependency closure logic
Refactors path solver code to prepare for future enhancements in dependency analysis.
This commit refactors the compute_exit_dependencies function within GCC’s path solver. It extracts the logic for closing dependencies into new, separate methods (close_dependencies and add_dependencies_of). This restructuring does not change the existing functionality but prepares the code for a subsequent commit that will allow closing a set of names for dependency analysis, improving maintainability and enabling future optimizations.
In Details
Within the gimple-range-path.cc and .h files, this change factorizes the dependency closure logic from compute_exit_dependencies. The new close_dependencies and add_dependencies_of methods isolate the closure of imports over defining operands. This prepares the path solver for a future modification where a specific set of names can be closed, facilitating more targeted and potentially efficient dependency analysis in subsequent passes.
- path solver
- A component within GCC that analyzes control flow and data dependencies to determine properties like variable ranges or possible execution paths.
- dependencies
- The relationships between different parts of the code, where one part's value or state depends on another's.
- GIMPLE
- GCC's internal representation (IR) for intermediate code, used after initial parsing and before final code generation.