+/*******************************************************************/
+/* flags to steer output */
+/*******************************************************************/
+
+/** An option to turn off edge labels */
+static int edge_label = 1;
+/** An option to turn off dumping values of constant entities */
+static int const_entities = 1;
+/** An option to dump the keep alive edges */
+static int dump_keepalive = 0;
+/** An option to dump ld_names instead of names. */
+static int dump_ld_name = 1;
+/** Compiler options to dump analysis information in dump_ir_graph */
+static int dump_out_edge_flag = 0;
+static int dump_loop_information_flag = 0;
+static int dump_backedge_information_flag = 1;
+static int dump_const_local = 0;
+/** An option to dump all graph anchors */
+static int dump_anchors = 0;
+
+int dump_dominator_information_flag = 0;
+int opt_dump_analysed_type_info = 1;
+int opt_dump_pointer_values_to_info = 0; /* default off: for test compares!! */
+
+static dumper_colors overrule_nodecolor = ird_color_default;
+
+/** An additional edge hook. */
+static DUMP_NODE_EDGE_FUNC dump_node_edge_hook = NULL;
+
+void set_dump_node_edge_hook(DUMP_NODE_EDGE_FUNC func)
+{
+ dump_node_edge_hook = func;
+}
+
+DUMP_NODE_EDGE_FUNC get_dump_node_edge_hook(void)
+{
+ return dump_node_edge_hook;
+}
+
+
+static DUMP_NODE_EDGE_FUNC dump_block_edge_hook = NULL;
+
+void set_dump_block_edge_hook(DUMP_NODE_EDGE_FUNC func)
+{
+ dump_block_edge_hook = func;
+}
+
+DUMP_NODE_EDGE_FUNC get_dump_block_edge_hook(void)
+{
+ return dump_node_edge_hook;
+}
+
+
+/** The vcg node attribute hook. */
+static DUMP_IR_GRAPH_FUNC dump_ir_graph_hook = NULL;
+/** The vcg node attribute hook. */
+static DUMP_NODE_VCGATTR_FUNC dump_node_vcgattr_hook = NULL;
+/** The vcg edge attribute hook. */
+static DUMP_EDGE_VCGATTR_FUNC dump_edge_vcgattr_hook = NULL;
+
+/* set the ir graph hook */
+void set_dump_ir_graph_hook(DUMP_IR_GRAPH_FUNC hook) {
+ dump_ir_graph_hook = hook;
+}
+/* set the node attribute hook */
+void set_dump_node_vcgattr_hook(DUMP_NODE_VCGATTR_FUNC hook) {
+ dump_node_vcgattr_hook = hook;
+}
+/* set the edge attribute hook */
+void set_dump_edge_vcgattr_hook(DUMP_EDGE_VCGATTR_FUNC hook) {
+ dump_edge_vcgattr_hook = hook;
+}
+
+int get_opt_dump_const_local(void) {
+ if (!dump_out_edge_flag && !dump_loop_information_flag)
+ return dump_const_local;
+ else
+ return 0;
+}
+
+void only_dump_method_with_name(ident *name) {
+ dump_file_filter_id = name;
+}
+
+ident *get_dump_file_filter_ident(void) {
+ return dump_file_filter_id;
+}
+
+/** Returns non-zero if dump file filter is not set, or if it is a
+ * prefix of name. */
+int is_filtered_dump_name(ident *name) {
+ if (!dump_file_filter_id) return 1;
+ return id_is_prefix(dump_file_filter_id, name);
+}
+
+/* To turn off display of edge labels. Edge labels often cause xvcg to
+ abort with a segmentation fault. */
+void turn_off_edge_labels(void) {
+ edge_label = 0;
+}
+
+void dump_consts_local(int flag) {
+ dump_const_local = flag;
+}
+
+void dump_constant_entity_values(int flag) {
+ const_entities = flag;
+}
+
+void dump_keepalive_edges(int flag) {
+ dump_keepalive = flag;
+}
+
+int get_opt_dump_keepalive_edges(void) {
+ return dump_keepalive;
+}
+
+void dump_out_edges(int flag) {
+ dump_out_edge_flag = flag;
+}
+
+void dump_dominator_information(int flag) {
+ dump_dominator_information_flag = flag;
+}
+
+void dump_loop_information(int flag) {
+ dump_loop_information_flag = flag;
+}
+
+void dump_backedge_information(int flag) {
+ dump_backedge_information_flag = flag;
+}
+
+/* Dump the information of type field specified in ana/irtypeinfo.h.
+ * If the flag is set, the type name is output in [] in the node label,
+ * else it is output as info.
+ */
+void set_opt_dump_analysed_type_info(int flag) {
+ opt_dump_analysed_type_info = flag;
+}
+
+void dump_pointer_values_to_info(int flag) {
+ opt_dump_pointer_values_to_info = flag;
+}
+
+void dump_ld_names(int flag) {
+ dump_ld_name = flag;
+}
+
+void dump_all_anchors(int flag) {
+ dump_anchors = flag;
+}
+
+/* -------------- some extended helper functions ----------------- */
+