On 10/20/2015 01:02 AM, Nikolai Bozhenov wrote: > > On 10/15/2015 09:42 PM, Trevor Saunders wrote: >>>> Sorry, a little late to the party.. but why is print_insn even in >>>> rtl.h? >>>> it seems that sched-vis.c is the only thing that uses it... >>>> >>>> Andrew >>> I'm going to use it in the scheduler... >> but then wouldn't something like sched-int.h make more sense? On >> the other hand it seems like printing insns is generally useful >> functionality, so I'm curious why the scheduler needs its own way of >> doing it. >> >> Trev > As for me, I believe sched-int.h is inappropriate place for print_insn > prototype because the function has nothing scheduler specific. And I like > Jeff's idea of removing sched-vis.c and moving everything from it into > print-rtl.[hc]. It would be nice if such code motion resulted also in some > interface and implementation unification for regular and slim dumpers. Not going to tackle the interface unification between the dumpers. Too many other things in my queue right now that would have higher priority. This patch just move the bits from sched-vis.c into print-rtl.c and moves their associated prototypes from rtl.h to print-rtl.h and handles the obvious fallout. The only thing mildly interesting here is all the bits going into print-rtl.c have to be conditional on !GENERATOR_FILE. I wish that weren't the case :( This was bootstrapped and regression tested on x86_64-linux-gnu and built all the config-list.mk targets as well, except for avr-rtems and interix which fail for existing unrelated issues. Installed on the trunk. Jeff