* Dump a snapshot of the statistic values.
* Never called from libFirm should be called from user.
*
- * @param name base name of the statistic output file
- * @param phase a phase name. Prefix will be firmstat-<phase>-
+ * @param fname base name of the statistic output file
+ * @param phase a phase name. Prefix will be firmstat-\<phase\>-
*/
-void stat_dump_snapshot(const char *name, const char *phase);
+void stat_dump_snapshot(const char *fname, const char *phase);
+
+/**
+ * Creates an ir_prog pass for stat_dump_snapshot().
+ *
+ * @param name the name of this pass or NULL
+ * @param fname base name of the statistic output file
+ * @param phase a phase name. Prefix will be firmstat-\<phase\>-
+ *
+ * @return the newly created ir_prog pass
+ */
+ir_prog_pass_t *stat_dump_snapshot_pass(
+ const char *name, const char *fname, const char *phase);
/**
* initialize the statistics module.