Recompute relations during relation query walk.
Improved value-relation queries by recomputing relations during the DOM walk.
This commit enhances the dom_oracle by introducing a mechanism to recompute potential relations during a DOM walk. When querying relationships between values, the system now re-evaluates promising edges, potentially discovering more accurate relationships. This change aims to improve the precision of value-relation analysis, addressing a bug where specific relations were not being correctly identified.
In Details
Inside GCC's value-relation analysis, the dom_oracle tracks relationships between values. This patch modifies find_relation_dom to call a new function, recomputed_relation. This function revisits dominator tree edges, re-evaluating the relationships on these edges if they appear promising. This is an optimization to refine relation discovery, particularly useful when previous relation computations might have been imprecise due to intermediate transformations or initial heuristic assumptions.
- DOM walk
- A traversal of the Dominator Tree. In compiler theory, a dominator tree represents the control flow graph's dominance relationships, where a node dominates another if all paths from the entry to the second node must pass through the first.
- dom_oracle
- A data structure or class in GCC used to query and maintain information about dominator relationships and value relations within a program.
- value-relation
- In compiler optimization, a value-relation describes how the value of one variable or expression relates to another (e.g., equality, inequality, or a specific mathematical function).