Catch unrenamed symbols during SSA verification
GCC SSA verification now correctly catches and reports statements with unrenamed symbols.
The GCC compiler’s SSA verification process has been improved to catch errors earlier. Previously, passes that failed to call update_stmt for symbols needing renaming would delay the error detection to later passes. This change ensures that such failures are now caught immediately during SSA operand verification, showing the specific statement responsible.
In Details
The operands_scanner::verify_ssa_operands function in tree-ssa-operands.cc now includes a check to ensure no operands require renaming. This prevents SSA verification failures from being deferred to subsequent passes, providing immediate feedback on missing update_stmt calls when symbols are not properly renamed during earlier optimization passes.
- SSA
- Static Single Assignment form. An intermediate representation in compilers where every variable is assigned a value exactly once. It simplifies many optimizations.
- SSA verification
- The process of checking if the compiler's internal representation (in this case, SSA form) adheres to its defined rules and invariants, ensuring correctness.
- update_stmt
- A function or method within the GCC compiler used to update symbol information associated with a statement, typically after transformations that might affect symbol references.
- tree-ssa-operands.cc
- A GCC source file containing code related to the verification of operands within the SSA (Static Single Assignment) representation.