https://gcc.gnu.org/g:0a999da1c8842fd94706c13ced15a5205f497ecf
commit r16-4446-g0a999da1c8842fd94706c13ced15a5205f497ecf Author: Andrew Pinski <[email protected]> Date: Tue Oct 14 10:36:03 2025 -0700 debug_tree: print out clique/base for MEM_REF/TARGET_MEM_REF While debugging PR 122273, I noticed that print_node was not printing out the clique/base for MEM_REF/TARGET_MEM_REF. This made harder to understand why operand_equal_p (without looking into the code) would be rejecting two looking the same MEM_REFs. Changes since v1: * v2: Don't print out clique/base if clique is 0. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * print-tree.cc (print_node): Print out clique/base for MEM_REF and TARGET_MEM_REF. Signed-off-by: Andrew Pinski <[email protected]> Diff: --- gcc/print-tree.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/print-tree.cc b/gcc/print-tree.cc index f84be762741c..7b8a680fff50 100644 --- a/gcc/print-tree.cc +++ b/gcc/print-tree.cc @@ -747,6 +747,14 @@ print_node (FILE *file, const char *prefix, tree node, int indent, case tcc_reference: case tcc_statement: case tcc_vl_exp: + if ((code == MEM_REF || code == TARGET_MEM_REF) + && MR_DEPENDENCE_CLIQUE (node) != 0) + { + indent_to (file, indent + 4); + fprintf (file, "clique: %d base: %d", + MR_DEPENDENCE_CLIQUE (node), + MR_DEPENDENCE_BASE (node)); + } if (code == BIND_EXPR) { print_node (file, "vars", TREE_OPERAND (node, 0), indent + 4);
