Add clobber parsing to the GIMPLE frontend
GIMPLE frontend now parses `__CLOBBER` expressions, improving debugging dump compatibility and paving the way for syntax unification.
This commit enhances the GIMPLE frontend by adding parsing support for __CLOBBER expressions. These expressions, previously uglified, are now parsed with a distinct identifier to avoid exposing internal implementation details. This change improves the fidelity of GIMPLE dumps for debugging and sets the stage for unifying dumping syntaxes in the future.
In Details
The GIMPLE frontend's parser in gcc/c/gimple-parser.cc is updated to recognize and parse __CLOBBER expressions. The syntax is changed from the previously uglified { CLOBBER [...] } to __CLOBBER [...] to avoid exposing internal CONSTRUCTOR details. The type of clobber is inferred from the left-hand side. This change also ensures that parsing of {v} in assignments remains unimplemented as it is redundant with information already available from the operand scanner.
- GIMPLE
- Generic Intermediate Representation, a low-level, three-address code representation used internally by GCC. It simplifies many analyses and optimizations.
- CLOBBER
- In the context of GIMPLE, a clobber expression indicates that a memory location or register is modified in a way not directly represented by a standard assignment or operation. It's used to communicate side effects.
- Operand scanner
- A component of the compiler that analyzes the operands of an expression or instruction to determine their properties, such as type, volatility, and usage.