From fb38546277129a16f93e985a65b9d5fc88277355 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Wed, 15 Jun 2005 07:58:40 +0000 Subject: [PATCH] checks for valid analysis information, output visibility of types. [r6011] --- ir/ir/irdump.h | 5 +++++ ir/ir/irdumptxt.c | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ir/ir/irdump.h b/ir/ir/irdump.h index a4564b2b7..5a5d30e28 100644 --- a/ir/ir/irdump.h +++ b/ir/ir/irdump.h @@ -413,6 +413,11 @@ void dump_types_as_text(unsigned verbosity, const char *suffix); /** Dumps all global variables as text. * + * Dumps a text representation of the entities in the global type. + * + * The file name is the program name (get_irp_name()), or 'TextTypes' + * if the program name is not set, appended by -globals.txt. + * For verbosity see the documentation of the verbosity flags above. */ void dump_globals_as_text(unsigned verbosity, const char *suffix); diff --git a/ir/ir/irdumptxt.c b/ir/ir/irdumptxt.c index c5a99de20..cdb563e5e 100644 --- a/ir/ir/irdumptxt.c +++ b/ir/ir/irdumptxt.c @@ -1080,12 +1080,13 @@ void dump_type_to_file (FILE *F, type *tp, dump_verbosity verbosity) { } } - fprintf(F, " state: %s,\n", get_type_state_name(get_type_state(tp))); - fprintf(F, " size: %2d Bits,\n", get_type_size_bits(tp)); - fprintf(F, " alignment: %2d Bits,\n", get_type_alignment_bits(tp)); + fprintf(F, " visibility: %s,\n", get_visibility_name(get_type_visibility(tp))); + fprintf(F, " state: %s,\n", get_type_state_name(get_type_state(tp))); + fprintf(F, " size: %2d Bits,\n", get_type_size_bits(tp)); + fprintf(F, " alignment: %2d Bits,\n", get_type_alignment_bits(tp)); if (is_atomic_type(tp) || is_Method_type(tp)) - fprintf(F, " mode: %s,\n", get_mode_name(get_type_mode(tp))); - fprintf(F, " dbg info: %p,\n", (void *)get_type_dbg_info(tp)); + fprintf(F, " mode: %s,\n", get_mode_name(get_type_mode(tp))); + fprintf(F, " dbg info: %p,\n", (void *)get_type_dbg_info(tp)); if (get_trouts_state()) { fprintf(F, "\n Type outs:\n"); @@ -1137,7 +1138,7 @@ void dump_type_to_file (FILE *F, type *tp, dump_verbosity verbosity) { #endif if (get_trouts_state() != outs_none) { fprintf(F, " Estimated #Instances: %lf\n", get_type_estimated_n_instances(tp)); - if (is_Class_type(tp)) { + if (is_Class_type(tp) && (get_irp_typeinfo_state() != ir_typeinfo_none)) { fprintf(F, " Estimated #dyn Calls: %lf\n", get_class_estimated_n_dyncalls(tp)); fprintf(F, " Estimated #Upcasts: %lf (#CastOps: %d)\n", get_class_estimated_n_upcasts(tp), get_class_n_upcasts(tp)); fprintf(F, " Estimated #Downcasts: %lf (#CastOps: %d)\n", get_class_estimated_n_downcasts(tp), get_class_n_downcasts(tp)); -- 2.20.1