Next:Optimization groups, Up:Optimization info [Contents][Index]
A dump_manager class is defined indumpfile.h. Various passesregister dumping pass-specific information viadump_register inpasses.cc. During the registration, an optimization pass canselect its optimization group (seeOptimization groups). Afterthat optimization information corresponding to the entire group(presumably from multiple passes) can be output via command-lineswitches. Note that if a pass does not fit into any of the pre-definedgroups, it can selectOPTGROUP_NONE.
Note that in general, a pass need not know its dump output file name,whether certain flags are enabled, etc. However, for legacy reasons,passes could also calldump_begin which returns a stream incase the particular pass has optimization dumps enabled. A pass couldcalldump_end when the dump has ended. These methods should goaway once all the passes are converted to use the new dumpinfrastructure.
The recommended way to setup the dump output is viadump_startanddump_end.