Refine GIMPLE statement handling by splitting gimple* variables into gassign*.
Compiler refactoring improves type specificity for GIMPLE assignment statements across multiple passes.
This commit introduces a significant refactoring effort within GCC’s GIMPLE processing. It splits out gimple* variables into more specific gassign* types in numerous functions across various passes, including bit-integer lowering, store merging, and OpenMP expansion. This change enhances type safety and clarity by ensuring that pointers to GIMPLE statements are accurately typed as assignments when that is their specific nature, improving internal compiler robustness.
In Details
This extensive patch modifies numerous GIMPLE manipulation functions across GCC's intermediate representation passes. It systematically replaces generic gimple* pointers, which could represent any GIMPLE statement type, with gassign* pointers when the context clearly indicates a GIMPLE assignment (GIMPLE_ASSIGN). This applies to functions within gimple-lower-bitint.cc, gimple-ssa-store-merging.cc, omp-expand.cc, and omp-simd-clone.cc, among others. The goal is to improve the compiler's internal type safety and reduce the potential for errors by being more precise about the GIMPL…
- gimple*
- A pointer to a GIMPLE statement in GCC's intermediate representation. GIMPLE is a three-address code representation used after the initial parsing and high-level optimization stages.
- gassign*
- A pointer to a GIMPLE assignment statement (GIMPLE_ASSIGN) in GCC's intermediate representation. This is a more specific type than
gimple*. - GIMPLE
- GCC's internal three-address code representation.
- intermediate representation (IR)
- A data structure or code format used internally by a compiler to represent the source code during various stages of translation and optimization.