+#define DEFAULT_RET 1
+#define COLOR_RET 1
+
+static unsigned mark_options;
+
+/**
+ * a vcg attribute hook
+ */
+static int stat_dag_mark_hook(FILE *F, ir_node *n, ir_node *l)
+{
+ static const char *colors[] = { "purple", "pink", "lightblue", "orange", "khaki", "orchid", "lilac", "turquoise" };
+ dag_entry_t *entry;
+
+ /* do not count Bad / NoMem */
+ if (l) {
+ ir_op *op = get_irn_op(l);
+
+ if (op == op_NoMem || op == op_Bad)
+ return DEFAULT_RET;
+
+ /* check for additional options */
+ op = get_irn_op(n);
+
+ if (mark_options & FIRMSTAT_LOAD_IS_LEAVE && op == op_Load)
+ return DEFAULT_RET;
+
+ if (mark_options & FIRMSTAT_CALL_IS_LEAVE && op == op_Call)
+ return DEFAULT_RET;
+ }
+
+ entry = get_irn_dag_entry(n);
+ if (! entry)
+ return DEFAULT_RET;
+
+ fprintf(F, "color: %s info3: \"DAG id: %u\"", colors[entry->id & 7], entry->id);
+
+ /* I know the color! */
+ return COLOR_RET;
+}
+