On Wed, Oct 15, 2025 at 2:22 AM Richard Biener <[email protected]> wrote: > > On Tue, Oct 14, 2025 at 8:20 PM Andrew Pinski > <[email protected]> wrote: > > > > 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. > > Most of the time it will be 0/0, can you do like in pretty-print and only > print this when MR_DEPENDENCE_CLIQUE != 0? > > Ok with that change.
Attached is what I pushed after testing. Thanks, Andrew > > Richard. > > > 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]> > > --- > > gcc/print-tree.cc | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/gcc/print-tree.cc b/gcc/print-tree.cc > > index f84be762741..fd775b8cb98 100644 > > --- a/gcc/print-tree.cc > > +++ b/gcc/print-tree.cc > > @@ -747,6 +747,13 @@ 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) > > + { > > + 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); > > -- > > 2.43.0 > >
v2-0001-debug_tree-print-out-clique-base-for-MEM_REF-TARG.patch
Description: Binary data
