Complete relation tables for partial equivalencies.
Fill in missing relation table entries for partial equivalencies to improve correctness.
This commit completes the partial equivalency entries in GCC’s relation tables. Previously, these entries defaulted to a conservative ‘VARYING’ state, assuming no interaction with other relations. The update correctly defines how partial equivalencies interact with negation, swapping, intersection, union, and transitivity, ensuring more accurate value relation tracking.
In Details
This change updates the value-relation.cc file in GCC. It fills in the unspecified entries for 'Partial Equivalency' (PE) in the relation tables used by the value slicer. The previous default of VARYING was too conservative for certain operations like self-swapping or intersection, leading to potential inaccuracies in value range propagation. The fix ensures correct handling of PE interactions with other relation types.
- Partial Equivalency (PE)
- A relation type used in GCC's value slicer. It indicates that two values might be equivalent under certain conditions, but not universally.
- Value Slicer
- A GCC optimization pass that analyzes the possible values of variables and expressions to enable further optimizations. It uses relation tables to track value relationships.
- Relation Tables
- Data structures used by the value slicer to store and query relationships between different values or expressions. They define operations like negation, intersection, and union for various relation types.