Fix inconsistency between reg_req and ins of Push: reg_req expected the stack in...
[libfirm] / ir / ir / irdumptxt.c
index 82a67d2..e7e5ceb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
 #include <stdarg.h>
 
 #include "irdump_t.h"
+#include "irgraph_t.h"
 
 #include "firm_common_t.h"
 
-#include "irgraph_t.h"
 #include "irprog_t.h"
 #include "entity_t.h"
 #include "trouts.h"
 #include "irgwalk.h"
 #include "tv_t.h"
+#include "irprintf.h"
 
 #include "irdom.h"
 #include "field_temperature.h"
@@ -200,6 +201,7 @@ int dump_irnode_to_file(FILE *F, ir_node *n) {
        /* Source types */
        switch (get_irn_opcode(n)) {
        case iro_Block: {
+               ir_fprintf(F, "  macro Block: %+F\n", get_Block_MacroBlock(n));
                fprintf(F, "  block visited: %ld\n", get_Block_block_visited(n));
                if (get_irg_dom_state(get_irn_irg(n)) != dom_none) {
                        fprintf(F, "  dom depth %d\n", get_Block_dom_depth(n));
@@ -207,12 +209,12 @@ int dump_irnode_to_file(FILE *F, ir_node *n) {
                        fprintf(F, "  max subtree pre num %d\n", get_Block_dom_max_subtree_pre_num(n));
                }
 
-               fprintf(F, "  Execution freqency statistics:\n");
+               fprintf(F, "  Execution frequency statistics:\n");
                if (get_irg_exec_freq_state(get_irn_irg(n)) != exec_freq_none)
                        fprintf(F, "    procedure local evaluation:   %8.2lf\n", get_irn_exec_freq(n));
 #ifdef INTERPROCEDURAL_VIEW
                if (get_irp_loop_nesting_depth_state() != loop_nesting_depth_none)
-                       fprintf(F, "    call freqency of procedure:   %8.2lf\n",
+                       fprintf(F, "    call frequency of procedure:   %8.2lf\n",
                        get_irg_method_execution_frequency(get_irn_irg(n)));
                if (get_irp_callgraph_state() == irp_callgraph_and_calltree_consistent)
                        fprintf(F, "    recursion depth of procedure: %8.2lf\n", (double)get_irn_recursion_depth(n));
@@ -528,9 +530,9 @@ static void dump_node_list(FILE *F, firm_kind *k, char *prefix,
  *  "prefix"    node16, node17\n
  */
 static void dump_type_list(FILE *F, ir_type *tp, char *prefix,
-                           int (*get_n_types)(ir_type *tp),
-                           ir_type *(*get_type)(ir_type *tp, int pos),
-                           char *name) {
+                           int (*get_n_types)(const ir_type *tp),
+                           ir_type *(*get_type)(const ir_type *tp, int pos),
+                           const char *name) {
        int i, n_nodes = get_n_types(tp);
        char *comma = "";
 
@@ -632,6 +634,9 @@ void dump_entity_to_file_prefix(FILE *F, ir_entity *ent, char *prefix, unsigned
                        fprintf(F, "\n%s  calling convention: ", prefix);
                        if (cc & cc_reg_param) fprintf(F, "regparam, ");
                        if (cc & cc_this_call) fprintf(F, "thiscall, ");
+                       if (cc & cc_compound_ret) fprintf(F, "compound_ret, ");
+                       if (cc & cc_frame_on_caller_stk) fprintf(F, "frame on caller's stack, ");
+                       cc &= ~(cc_compound_ret|cc_frame_on_caller_stk);
                        if (IS_CDECL(cc))
                                fprintf(F, "cdecl");
                        else if (IS_STDCALL(cc))