>> Yeah, one or other way to being able to debug what exactly has been >> performed during the iterator expansion is certainly desirable for the >> future. > We actually have internal machinery for dumping MDs with expanded > iterators and substs, but this looks really kinda hack now. > We're going to submit it as subsequent patch after that one > is checked in (there'll be no change in `define_subst' interface) and some > discussion about necessary infrastructure changes is performed.
It's fairly easy to dump MD-file with expanded iterators and subst - we could do it in any gen*-utility with a small piece of code. Like this: +void +print_rtl_list (struct queue_elem **q) +{ + struct queue_elem *elem; + for (elem = *q; elem ; elem = elem->next) + debug_rtx (elem->data); +} ... + print_rtl_list (&define_attr_queue); + print_rtl_list (&define_pred_queue); + print_rtl_list (&define_insn_queue); + print_rtl_list (&define_cond_exec_queue); + print_rtl_list (&define_subst_queue); + print_rtl_list (&other_queue); Currently I just don't know what way should be used to invoke it - in our development we use an environment variable as a trigger for this, but this is a real hack: + if (getenv ("__DUMP_RTL_LIST")) + { + print_rtl_list (&define_attr_queue); ... + } I don't believe this way is appropriate to be in the trunk - so, could you please advise how it should be done? Maybe we should introduce a new gen-utility which should be used only for dumping md-files and add a new target into makefile to invoke it, or should we add a command line option to existing utilities? -- Thanks, Michael -- --- Best regards, Michael V. Zolotukhin, Software Engineer Intel Corporation.