+ * 29.8.03 Goetz
+ Cast: irsimpletype: implement type analyses for one node. Test the
+ effort of that analyses. Add optimization to iropt that removes
+ Cast nodes.
+
* 22.8.2003 Goetz
Firm const nodes should have a type.
In jack all nodes are typed now, except the Const nodes. Only const from
topdir = ../..
subdir := ir/ana
-INSTALL_HEADERS = irouts.h irdom.h cgana.h irloop.h
+INSTALL_HEADERS = irouts.h irdom.h cgana.h irloop.h irtypeinfo.h irsimpletype.h
SOURCES = $(INSTALL_HEADERS)
SOURCES += Makefile.in \
irouts.c irdom_t.h irdom.c cgana.c \
- irloop_t.h irbackedge.c irbackedge_t.h irscc.c
+ irloop_t.h irbackedge.c irbackedge_t.h irscc.c irtypeinfo.c irsimpletype.c
include $(topdir)/MakeRules
void construct_backedges(ir_graph *irg);
/** Constructs backedges for all irgs in interprocedural view. All
- loops in the graph will be marked as such, not only realizeable
- loops and recursions in the program. E.g., if the same funcion is
- called twice, there is a loop between the first funcion return and
- the second call. */
+ loops in the graph will be marked as such, not only realizeable
+ loops and recursions in the program. E.g., if the same funcion is
+ called twice, there is a loop between the first funcion return and
+ the second call. */
void construct_ip_backedges(void);
#endif /* _IRLOOP_H_ */
--- /dev/null
+/**
+ *
+ * @file irsimpeltype.c
+ *
+ * Project: libFIRM
+ * File name: ir/ana/irsimpletype.c
+ * Purpose: Run most simple type analyses.
+ * Author: Goetz Lindenmaier
+ * Modified by:
+ * Created: 22.8.2003
+ * CVS-ID: $Id$
+ * Copyright: (c) 2003 Universität Karlsruhe
+ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ *
+ *
+ * We compute type information for each node. It is derived from the
+ * types of the origines of values, e.g. parameter types can be derived
+ * from the method type.
+ * The type information so far is saved in the link field.
+ *
+ */
+
+
+# include "irtypeinfo.h"
+# include "irsimpletype.h"
+
+# include "irprog.h"
+# include "irgwalk.h"
+# include "ident.h"
+
+#define VERBOSE_UNKNOWN_TYPE(s) printf s
+
+static type *phi_cycle_type = NULL;
+
+
+/* ------------ Building and Removing the type information ----------- */
+
+
+/* init type link field so that types point to their pointers. */
+void precompute_pointer_types(void) {
+ int i;
+ set_type_link(unknown_type, unknown_type);
+ set_type_link(none_type, unknown_type);
+ for (i = 0; i < get_irp_n_types(); ++i)
+ set_type_link(get_irp_type(i), (void *)unknown_type);
+ for (i = get_irp_n_types()-1; i>=0; --i) {
+ type *tp = get_irp_type(i);
+ if (is_pointer_type(tp))
+ set_type_link(get_pointer_points_to_type(tp), (void *)tp);
+ }
+}
+
+/* Store pointer in link to speed up search of pointer type. */
+static type *find_pointer_type_to (type *tp) {
+ return (type *)get_type_link(tp);
+}
+
+static type* compute_irn_type(ir_node *n);
+
+static type *find_type_for_Proj(ir_node *n) {
+ type *tp;
+ ir_node *pred = get_Proj_pred(n);
+ ir_mode *m = get_irn_mode(n);
+
+ if (m == mode_T ||
+ m == mode_BB ||
+ m == mode_X ||
+ m == mode_M ||
+ m == mode_b )
+ return none_type;
+
+ switch(get_irn_opcode(pred)) {
+ case iro_Proj: {
+ /* Deal with Start / Call here: we need to know the Proj Nr. */
+ assert(get_irn_mode(pred) == mode_T);
+ ir_node *pred_pred = get_Proj_pred(pred);
+ if (get_irn_op(pred_pred) == op_Start) {
+ type *mtp = get_entity_type(get_irg_ent(get_Start_irg(pred_pred)));
+ tp = get_method_param_type(mtp, get_Proj_proj(n));
+ } else if (get_irn_op(pred_pred) == op_Call) {
+ type *mtp = get_Call_type(pred_pred);
+ tp = get_method_res_type(mtp, get_Proj_proj(n));
+ } else {
+ VERBOSE_UNKNOWN_TYPE(("Proj %ld from Proj from ??: unknown type\n", get_irn_node_nr(n)));
+ tp = unknown_type;
+ }
+ } break;
+ case iro_Start: {
+ /* globals and frame pointer */
+ if (get_Proj_proj(n) == pns_frame_base)
+ tp = find_pointer_type_to(get_irg_frame_type(get_Start_irg(pred)));
+ else if (get_Proj_proj(n) == pns_globals)
+ tp = find_pointer_type_to(get_glob_type());
+ else if (get_Proj_proj(n) == pns_value_arg_base) {
+ VERBOSE_UNKNOWN_TYPE(("Value arg base proj %ld from Start: unknown type\n", get_irn_node_nr(n)));
+ tp = unknown_type; //find_pointer_type_to(get....(get_entity_type(get_irg_ent(get_Start_irg(pred)))));
+ } else {
+ VERBOSE_UNKNOWN_TYPE(("Proj %ld %ld from Start: unknown type\n", get_Proj_proj(n), get_irn_node_nr(n)));
+ tp = unknown_type;
+ }
+ } break;
+ case iro_Call: {
+ /* value args pointer */
+ if (get_Proj_proj(n) == pncl_value_res_base) {
+ VERBOSE_UNKNOWN_TYPE(("Value res base Proj %ld from Call: unknown type\n", get_irn_node_nr(n)));
+ tp = unknown_type; //find_pointer_type_to(get....get_Call_type(pred));
+ } else {
+ VERBOSE_UNKNOWN_TYPE(("Proj %ld %ld from Call: unknown type\n", get_Proj_proj(n), get_irn_node_nr(n)));
+ tp = unknown_type;
+ }
+ } break;
+ default:
+ tp = compute_irn_type(pred);
+ }
+
+ return tp;
+}
+
+static type *find_type_for_node(ir_node *n) {
+ type *tp = NULL;
+ type *tp1 = NULL, *tp2 = NULL;
+ ir_node *a = NULL, *b = NULL;
+
+ //DDMN(n);
+
+ if (is_unop(n)) {
+ a = get_unop_op(n);
+ tp1 = compute_irn_type(a);
+ }
+ if (is_binop(n)) {
+ a = get_binop_left(n);
+ b = get_binop_right(n);
+ tp1 = compute_irn_type(a);
+ tp2 = compute_irn_type(b);
+ }
+
+ switch(get_irn_opcode(n)) {
+
+ case iro_InstOf: {
+ assert(0 && "op_InstOf not supported");
+ } break;
+
+ /* has no type */
+ case iro_Block:
+ case iro_Start:
+ case iro_End:
+ case iro_Jmp:
+ case iro_Cond:
+ case iro_Return:
+ case iro_Raise:
+ case iro_Call:
+ case iro_Cmp:
+ case iro_Store:
+ case iro_Free:
+ case iro_Sync:
+ case iro_Tuple:
+ case iro_Bad:
+ case iro_Break:
+ case iro_CallBegin:
+ case iro_EndReg:
+ case iro_EndExcept:
+ tp = none_type; break;
+
+ /* compute the type */
+ case iro_Const: tp = get_Const_type(n); break;
+ case iro_SymConst:
+ tp = unknown_type; break;
+ case iro_Sel:
+ tp = find_pointer_type_to(get_entity_type(get_Sel_entity(n))); break;
+ /* assymetric binops */
+ case iro_Shl:
+ case iro_Shr:
+ case iro_Shrs:
+ case iro_Rot:
+ tp = tp1; break;
+ case iro_Cast:
+ tp = get_Cast_type(n); break;
+ case iro_Phi: {
+ int i;
+ int n_preds = get_Phi_n_preds(n);
+
+ if (n_preds == 0) {tp = none_type; break; }
+
+ /* initialize this Phi */
+ set_irn_type(n, phi_cycle_type);
+
+ /* find a first real type */
+ for (i = 0; i < n_preds; ++i) {
+ tp1 = compute_irn_type(get_Phi_pred(n, i));
+ assert(tp1 != initial_type);
+ if ((tp1 != phi_cycle_type) && (tp1 != none_type))
+ break;
+ }
+
+ /* find a second real type */
+ tp2 = tp1;
+ for (; (i < n_preds); ++i) {
+ tp2 = compute_irn_type(get_Phi_pred(n, i));
+ if ((tp2 == phi_cycle_type) || (tp2 == none_type)) {
+ tp2 = tp1;
+ continue;
+ }
+ if (tp2 != tp1) break;
+ }
+
+ //printf("Types in Phi %s and %s \n", get_type_name(tp1), get_type_name(tp2));
+
+ if (tp1 == tp2) { tp = tp1; break; }
+
+ VERBOSE_UNKNOWN_TYPE(("Phi %ld with two different types: %s, %s: unknown type.\n", get_irn_node_nr(n),
+ get_type_name(tp1), get_type_name(tp2)));
+ tp = unknown_type;
+ } break;
+ case iro_Load: {
+ ir_node *a = get_Load_ptr(n);
+ if (get_irn_op(a) == op_Sel)
+ tp = get_entity_type(get_Sel_entity(a));
+ else if ((get_irn_op(a) == op_Const) &&
+ (tarval_is_entity(get_Const_tarval(a))))
+ tp = get_entity_type(tarval_to_entity(get_Const_tarval(a)));
+ else if (is_pointer_type(compute_irn_type(a)))
+ tp = get_pointer_points_to_type(get_irn_type(a));
+ else {
+ VERBOSE_UNKNOWN_TYPE(("Load %ld with typeless address. result: unknown type\n", get_irn_node_nr(n)));
+ tp = unknown_type;
+ }
+ } break;
+ case iro_Alloc:
+ tp = find_pointer_type_to(get_Alloc_type(n)); break;
+ case iro_Proj:
+ tp = find_type_for_Proj(n); break;
+ case iro_Id:
+ tp = compute_irn_type(get_Id_pred(n)); break;
+ case iro_Unknown:
+ tp = unknown_type; break;
+ case iro_Filter:
+ assert(0 && "Filter not implemented"); break;
+
+ /* catch special cases with fallthrough to binop/unop cases in default. */
+ case iro_Sub: {
+ if (mode_is_int(get_irn_mode(n)) &&
+ mode_is_reference(get_irn_mode(a)) &&
+ mode_is_reference(get_irn_mode(b)) ) {
+ VERBOSE_UNKNOWN_TYPE(("Sub %ld ptr - ptr = int: unknown type\n", get_irn_node_nr(n)));
+ tp = unknown_type; break;
+ }
+ } /* fall through to Add. */
+ case iro_Add: {
+ if (mode_is_reference(get_irn_mode(n)) &&
+ mode_is_reference(get_irn_mode(a)) &&
+ mode_is_int(get_irn_mode(b)) ) {
+ tp = tp1; break;
+ }
+ if (mode_is_reference(get_irn_mode(n)) &&
+ mode_is_int(get_irn_mode(a)) &&
+ mode_is_reference(get_irn_mode(b)) ) {
+ tp = tp2; break;
+ }
+ goto default_code;
+ } break;
+ case iro_Mul: {
+ if (get_irn_mode(n) != get_irn_mode(a)) {
+ VERBOSE_UNKNOWN_TYPE(("Mul %ld int1 * int1 = int2: unknown type\n", get_irn_node_nr(n)));
+ tp = unknown_type; break;
+ }
+ goto default_code;
+ } break;
+
+ default:
+ default_code: {
+
+ if (is_unop(n)) {
+ /* Is is proper to walk past a Conv??? */
+ tp = tp1;
+ break;
+ }
+
+ if (is_binop(n)) {
+ if (tp1 == tp2) {
+ tp = tp1;
+ break;
+ }
+ if((tp1 == phi_cycle_type) || (tp2 == phi_cycle_type)) {
+ tp = phi_cycle_type;
+ break;
+ }
+ VERBOSE_UNKNOWN_TYPE(("Binop %ld with two different types: %s, %s: unknown type \n", get_irn_node_nr(n),
+ get_type_name(tp1), get_type_name(tp2)));
+ tp = unknown_type;
+ break;
+ }
+
+ printf(" not implemented: "); DDMN(n);
+ } break; /* default */
+ } /* end switch */
+
+ //printf (" found %s ", get_type_name(tp)); DDM;
+
+ return tp;
+}
+
+
+static type* compute_irn_type(ir_node *n) {
+ //DDMN(n);
+
+ type *tp = get_irn_type(n);
+
+ if ((tp == initial_type)) {
+ tp = find_type_for_node(n);
+ set_irn_type(n, tp);
+ }
+
+ //printf (" found %s ", get_type_name(tp)); DDM;
+
+ return tp;
+}
+
+static void compute_type(ir_node *n, void *env) {
+
+ type *tp = get_irn_type(n);
+ if (tp == phi_cycle_type) {
+ //printf(" recomputing for phi_cycle_type "); DDMN(n);
+ set_irn_type(n, initial_type);
+ }
+
+ compute_irn_type(n);
+}
+
+static void analyse_irg (ir_graph *irg) {
+ set_irg_typeinfo_state(irg, irg_typeinfo_consistent);
+ irg_walk_graph(irg, NULL, compute_type, NULL);
+}
+
+static void init_irsimpletype(void) {
+ init_irtypeinfo();
+ if (!phi_cycle_type)
+ phi_cycle_type = new_type_class(new_id_from_str("phi_cycle_type"));
+ precompute_pointer_types();
+}
+
+void simple_analyse_types(void) {
+ int i;
+ init_irsimpletype();
+ for (i = 0; i < get_irp_n_irgs(); i++) {
+ current_ir_graph = get_irp_irg(i);
+ analyse_irg(current_ir_graph);
+ }
+}
+
+void free_simple_type_information(void) {
+ free_irtypeinfo();
+
+ if (phi_cycle_type) {
+ free_type(phi_cycle_type);
+ phi_cycle_type = NULL;
+ }
+}
--- /dev/null
+/**
+ *
+ * @file irsimpeltype.h
+ *
+ * Project: libFIRM
+ * File name: ir/ana/irsimpletype.h
+ * Purpose: Run most simple type analyses.
+ * Author: Goetz Lindenmaier
+ * Modified by:
+ * Created: 22.8.2003
+ * CVS-ID: $Id$
+ * Copyright: (c) 2003 Universität Karlsruhe
+ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ *
+ *
+ * We compute type information for each node. It is derived from the
+ * types of the origines of values, e.g. parameter types can be derived
+ * from the method type.
+ * The type information so far is saved in the link field.
+ *
+ */
+
+
+# ifndef _IRSIMPLETYPE_H_
+# define _IRSIMPLETYPE_H_
+
+# include "irgraph.h"
+# include "irnode.h"
+# include "type.h"
+
+
+
+/* ------------ Building and Removing the type information ----------- */
+
+/** Computes type information for each node in all ir graphs.
+ *
+ * Computes type information for each node. Stores the information in the
+ * field defined in irtypeinfo.h. Sets typestate in irg to irg_typeinfo_consistent.
+ *
+ * Derives the information from nodes/pattarns that give hints about the
+ * type, as projecting an argument from the Start node. Deletes all previous
+ * type information.
+ *
+ * If a non-pointer type is specified for a pointer value (as the Alloc node does:
+ * it contains the type allocated, but to type the result we need the type that
+ * describes a pointer to the allocated type) searches for a corresponding pointer
+ * type. If several exist, uses one of them. If none exists, uses unknown_type.
+ *
+ * Uses the link field of types. Sets this field of each type to point to a
+ * pointer type that points to the type (Got it? ;-)).
+ */
+void simple_analyse_types(void);
+
+/** Frees all type information datastructures. Sets the flag in irg to "???". */
+void free_simple_type_information(void);
+
+/** Computes type information for a node.
+ *
+ * Computes type information for a node. Does not remark this type information
+ * in the ir. Computes the type information by analysing the predecessors.
+ * Calls the same basic analyses routine for a node as simple_analyse_types,
+ * but returns unknown_type for Phi nodes.
+ * Each call is theoretically O(n).
+ *
+ * Not yet implemented, but I guess we want this for iropt, to find the
+ * type for newly allocated constants.
+ */
+//type *analyse_irn_type(ir_node *node);
+
+#endif /* _IRSIMPLETYPE_H_ */
--- /dev/null
+/**
+ *
+ * @file irtypeinfo.c
+ *
+ * Project: libFIRM
+ * File name: ir/ana/irtypeinfo.c
+ * Purpose: Data structure to hold type information for nodes.
+ * Author: Goetz Lindenmaier
+ * Modified by:
+ * Created: 28.8.2003
+ * CVS-ID: $Id$
+ * Copyright: (c) 2003 Universität Karlsruhe
+ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ *
+ * Data structure to hold type information for nodes.
+ *
+ * This module defines a field "type" of type "type *" for each ir node.
+ * It defines a flag for irgraphs to mark whether the type info of the
+ * graph is valid. Further it defines an auxiliary type "initial_type".
+ *
+ * The module defines a map that contains pairs (irnode, type). If an irnode
+ * is not in the map it is assumed to be initialized, i.e., the initialization
+ * requires no compute time. As firm nodes can not be freed and reallocated
+ * pointers for nodes are unique (until a call of dead_node_elimination).
+ *
+ */
+
+#include "irtypeinfo.h"
+
+#include <stddef.h>
+
+#include "irgraph_t.h" /* for setting the state flag. */
+#include "irprog.h"
+#include "pmap.h"
+
+/* ------------ The map. ---------------------------------------------- */
+
+
+static pmap *type_node_map = NULL;
+
+
+/* ------------ Auxiliary type. --------------------------------------- */
+
+/* This auxiliary type expresses that a field is uninitialized. The
+ * variable is set by init_irtypeinfo. The type is freed by
+ * free_irtypeinfo.
+ */
+type *initial_type = NULL;
+
+
+/* ------------ Initializing this module. ----------------------------- */
+
+/* Initializes the type information module.
+ * Generates a type "initial_type" and sets the type of all nodes to this type.
+ * Calling set/get_irn_type is invalid before calling init. Requires memory
+ * in the order of MIN(<calls to set_irn_type>, #irnodes).
+ */
+void init_irtypeinfo(void) {
+ int i;
+
+ if (!initial_type)
+ initial_type = new_type_class(new_id_from_str("initial_type"));
+
+ /* We need a new, empty map. */
+ if (type_node_map) pmap_destroy(type_node_map);
+ type_node_map = pmap_create();
+
+ for (i = 0; i < get_irp_n_irgs(); ++i)
+ set_irg_typeinfo_state(get_irp_irg(i), irg_typeinfo_none);
+
+}
+
+void free_irtypeinfo(void) {
+ int i;
+
+ if (initial_type) {
+ free_type(initial_type);
+ initial_type = NULL;
+ } else
+ assert(0 && "call init_type_info before freeing");
+
+
+ if (type_node_map) {
+ pmap_destroy(type_node_map);
+ type_node_map = NULL;
+ } else
+ assert(0 && "call init_type_info before freeing");
+
+ for (i = 0; i < get_irp_n_irgs(); ++i)
+ set_irg_typeinfo_state(get_irp_irg(i), irg_typeinfo_none);
+}
+
+
+/* ------------ Irgraph state handling. ------------------------------- */
+
+void set_irg_typeinfo_state(ir_graph *irg, irg_typeinfo_state s) {
+ assert(is_ir_graph(irg));
+ irg->typeinfo_state = s;
+}
+
+irg_typeinfo_state get_irg_typeinfo_state(ir_graph *irg) {
+ assert(is_ir_graph(irg));
+ return irg->typeinfo_state;
+}
+
+/* ------------ Irnode type information. ------------------------------ */
+
+/* These routines only work properly if the ir_graph is in state
+ * irg_typeinfo_consistent or irg_typeinfo_inconsistent. They
+ * assume current_ir_graph set properly.
+ */
+type *get_irn_type(ir_node *n) {
+ type *res = initial_type;
+ assert(get_irg_typeinfo_state(current_ir_graph) == irg_typeinfo_consistent ||
+ get_irg_typeinfo_state(current_ir_graph) == irg_typeinfo_inconsistent );
+
+ if (pmap_contains(type_node_map, (void *)n))
+ res = (type *) pmap_get(type_node_map, (void *)n);
+
+ return res;
+}
+
+void set_irn_type(ir_node *n, type *tp) {
+ assert(get_irg_typeinfo_state(current_ir_graph) == irg_typeinfo_consistent ||
+ get_irg_typeinfo_state(current_ir_graph) == irg_typeinfo_inconsistent );
+
+ pmap_insert(type_node_map, (void *)n, (void *)tp);
+}
--- /dev/null
+/**
+ *
+ * @file irtypeinfo.h
+ *
+ * Project: libFIRM
+ * File name: ir/ana/irtypeinfo.h
+ * Purpose: Data structure to hold type information for nodes.
+ * Author: Goetz Lindenmaier
+ * Modified by:
+ * Created: 28.8.2003
+ * CVS-ID: $Id$
+ * Copyright: (c) 2003 Universität Karlsruhe
+ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ *
+ * Data structure to hold type information for nodes.
+ *
+ * This module defines a field "type" of type "type *" for each ir node.
+ * It defines a flag for irgraphs to mark whether the type info of the
+ * graph is valid. Further it defines an auxiliary type "init_type".
+ *
+ */
+
+
+# ifndef _IRTYPEINFO_H_
+# define _IRTYPEINFO_H_
+
+# include "irgraph.h"
+# include "irnode.h"
+# include "type.h"
+
+/* ------------ Auxiliary type. --------------------------------------- */
+
+/** An auxiliary type used to express that a field is uninitialized.
+ *
+ * This auxiliary type expresses that a field is uninitialized. The
+ * variable is set by init_irtypeinfo. The type is freed by
+ * free_irtypeinfo.
+ */
+extern type *initial_type;
+
+
+
+/* ------------ Initializing this module. ----------------------------- */
+
+/** Initializes the type information module.
+ *
+ * Initializes the type information module.
+ * Generates a type "init_type" and sets the type of all nodes to this type.
+ * Calling set/get_irn_type is invalid before calling init. Requires memory
+ * in the order of MIN(<calls to set_irn_type>, #irnodes).
+ */
+void init_irtypeinfo(void);
+void free_irtypeinfo(void);
+
+/* ------------ Irgraph state handling. ------------------------------- */
+
+typedef enum {
+ irg_typeinfo_none, /**< No typeinfo computed, calls to set/get_irn_type
+ are invalid. */
+ irg_typeinfo_consistent, /**< Type info valid, calls to set/get_irn_type return
+ the proper type. */
+ irg_typeinfo_inconsistent /**< Type info can be accessed, but it can be invalid
+ because of other transformations. */
+} irg_typeinfo_state;
+
+void set_irg_typeinfo_state(ir_graph *irg, irg_typeinfo_state s);
+irg_typeinfo_state get_irg_typeinfo_state(ir_graph *irg);
+
+/* ------------ Irnode type information. ------------------------------ */
+
+/** Accessing the type information.
+ *
+ * These routines only work properly if the ir_graph is in state
+ * irg_typeinfo_consistent or irg_typeinfo_inconsistent. They
+ * assume current_ir_graph set properly.
+ */
+type *get_irn_type(ir_node *n);
+void set_irn_type(ir_node *n, type *tp);
+
+#endif /* _IRTYPEINFO_H_ */
/** a list of firm kinds
@@@ not all datatypes are tagged yet. */
typedef enum {
+ k_BAD = 0, /**< an invalid firm node */
k_entity, /**< an entity */
k_type, /**< a type */
k_ir_graph, /**< an ir graph */
}
INLINE ir_node *
-new_rd_Const (dbg_info* db, ir_graph *irg, ir_node *block, ir_mode *mode, tarval *con)
+new_rd_Const_type (dbg_info* db, ir_graph *irg, ir_node *block, ir_mode *mode, tarval *con, type *tp)
{
ir_node *res;
res = new_ir_node (db, irg, block, op_Const, mode, 0, NULL);
- res->attr.con = con;
+ res->attr.con.tv = con;
+ set_Const_type(res, tp); /* Call method because of complex assertion. */
res = optimize_node (res);
+ assert(get_Const_type(res) == tp);
irn_vrfy_irg (res, irg);
#if 0
return res;
}
+INLINE ir_node *
+new_rd_Const (dbg_info* db, ir_graph *irg, ir_node *block, ir_mode *mode, tarval *con)
+{
+ type *tp = unknown_type;
+ if (tarval_is_entity(con))
+ tp = find_pointer_type_to_type(get_entity_type(get_tarval_entity(con)));
+ return new_rd_Const_type (db, irg, block, mode, con, tp);
+}
+
INLINE ir_node *
new_rd_Id (dbg_info* db, ir_graph *irg, ir_node *block, ir_node *val, ir_mode *mode)
{
mode, con);
}
+ir_node *
+new_d_Const_type (dbg_info* db, ir_mode *mode, tarval *con, type *tp)
+{
+ return new_rd_Const_type (db, current_ir_graph, current_ir_graph->start_block,
+ mode, con, tp);
+}
+
+
ir_node *
new_d_Id (dbg_info* db, ir_node *val, ir_mode *mode)
{
ir_node *store, int arity, ir_node *in[]);
ir_node *new_rd_Raise (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *store, ir_node *obj);
+ir_node *new_rd_Const_type (dbg_info* db, ir_graph *irg, ir_node *block,
+ ir_mode *mode, tarval *con, type *tp);
ir_node *new_rd_Const (dbg_info *db, ir_graph *irg, ir_node *block,
ir_mode *mode, tarval *con);
ir_node *new_rd_SymConst (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *new_d_Cond (dbg_info* db, ir_node *c);
ir_node *new_d_Return (dbg_info* db, ir_node *store, int arity, ir_node *in[]);
ir_node *new_d_Raise (dbg_info* db, ir_node *store, ir_node *obj);
+ir_node *new_d_Const_type (dbg_info* db, ir_mode *mode, tarval *con, type *tp);
ir_node *new_d_Const (dbg_info* db, ir_mode *mode, tarval *con);
ir_node *new_d_SymConst (dbg_info* db, type_or_id_p value, symconst_kind kind);
ir_node *new_d_simpleSel(dbg_info* db, ir_node *store, ir_node *objptr, entity *ent);
int dump_dominator_information_flag = 0;
int dump_loop_information_flag = 0;
int dump_const_local = 0;
+bool opt_dump_analysed_type_info = 1;
INLINE bool get_opt_dump_const_local(void) {
if (!dump_out_edge_flag && !dump_loop_information_flag)
}
}
+static void dump_node_typeinfo(ir_node *n) {
+ if (!opt_dump_analysed_type_info) return;
+ if (get_irg_typeinfo_state(current_ir_graph) == irg_typeinfo_consistent ||
+ get_irg_typeinfo_state(current_ir_graph) == irg_typeinfo_inconsistent ) {
+ type *tp = get_irn_type(n);
+ if (tp != none_type)
+ fprintf (F, " [%s]", get_type_name(tp));
+ else
+ fprintf (F, " []");
+ }
+}
+
static INLINE void
dump_node_nodeattr (ir_node *n)
{
for (i = 0; i < get_method_n_ress(tp); ++i)
fprintf(F, " resul %d type: %s \n", i, get_type_name(get_method_res_type(tp, i)));
} break;
+ case iro_Const: {
+ type *tp = get_Const_type(n);
+ assert(tp != none_type);
+ fprintf(F, "Const of type %s \n", get_type_name(get_Const_type(n)));
+ } break;
default: ;
}
+ if (get_irg_typeinfo_state(current_ir_graph) == irg_typeinfo_consistent ||
+ get_irg_typeinfo_state(current_ir_graph) == irg_typeinfo_inconsistent )
+ if (get_irn_type(n) != none_type)
+ fprintf (F, "\nAnalysed type: %s", get_type_name(get_irn_type(n)));
fprintf (F, "\"");
fprintf(F, " label: \"");
dump_node_opcode(con);
dump_node_mode (con);
+ dump_node_typeinfo(con);
fprintf (F, " ");
dump_node_nodeattr(con);
#ifdef DEBUG_libfirm
dump_node_opcode(n);
dump_node_mode (n);
+ dump_node_typeinfo(n);
fprintf (F, " ");
dump_node_nodeattr(n);
#ifdef DEBUG_libfirm
vcg_close();
}
+
+/* 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 dump_analysed_type_info(bool b) {
+ opt_dump_analysed_type_info = b;
+}
*/
void dont_dump_loop_information(void);
+/**
+ * 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 dump_analysed_type_info(bool b);
+
# endif /* _IRDUMP_H_ */
res->pinned = pinned;
res->outs_state = no_outs;
res->dom_state = no_dom;
+ res->typeinfo_state = irg_typeinfo_none;
/** Type information for the procedure of the graph **/
res->ent = ent;
graph, nor the entity standing for this graph. */
void free_ir_graph (ir_graph *irg) {
set_entity_irg(irg->ent, NULL);
+ irg->kind = k_BAD;
free(irg->obst);
#if USE_EXPLICIT_PHI_IN_STACK
free_Phi_in_stack(irg->Phi_in_stack);
# include "pset.h"
# include "irgraph.h"
# include "firm_common_t.h"
+# include "irtypeinfo.h"
#define FRAME_TP_SUFFIX "frame_tp"
op_pinned pinned; /**< Flag for status of nodes */
irg_outs_state outs_state; /**< Out edges. */
irg_dom_state dom_state; /**< Dominator information */
+ irg_typeinfo_state typeinfo_state; /**< Validity of type inforamtion */
/* -- Fields for construction -- */
#if USE_EXPLICIT_PHI_IN_STACK
typedef enum {
/* Predefined sorts of modes */
irms_auxiliary, /**< Only for Firm use. Not extensible. (irm_T) */
- irms_control_flow, /**< Marks all control flow modes. Not extensible. (irm_BB, irm_X) */
- irms_memory, /**< Marks the memory mode. Not extensible. (irm_M) */
+ irms_control_flow, /**< Marks all control flow modes. Not extensible. (irm_BB, irm_X) */
+ irms_memory, /**< Marks the memory mode. Not extensible. (irm_M) */
irms_internal_boolean, /**< Internal boolean representation.
Storing to memory impossible, convert first. (irm_b) */
/** user-extensible sorts of modes **/
#endif
}
-INLINE tarval *
+INLINE const_attr
get_irn_const_attr (ir_node *node)
{
assert (node->op == op_Const);
INLINE void
free_End (ir_node *end) {
assert (end->op == op_End);
+ end->kind = k_BAD;
/* DEL_ARR_F(end->in); GL @@@ tut nicht ! */
end->in = NULL; /* @@@ make sure we get an error if we use the
in array afterwards ... */
INLINE tarval *get_Const_tarval (ir_node *node) {
assert (node->op == op_Const);
- return get_irn_const_attr(node);
+ return node->attr.con.tv;
}
INLINE void
set_Const_tarval (ir_node *node, tarval *con) {
assert (node->op == op_Const);
- node->attr.con = con;
+ node->attr.con.tv = con;
}
+
+/* The source language type. Must be an atomic type. Mode of type must
+ be mode of node. For tarvals from entities type must be pointer to
+ entity type. */
+INLINE type *
+get_Const_type (ir_node *node) {
+ assert (node->op == op_Const);
+ return node->attr.con.tp;
+}
+
+INLINE void
+set_Const_type (ir_node *node, type *tp) {
+ assert (node->op == op_Const);
+ if (tp != unknown_type) {
+ assert (is_atomic_type(tp));
+ assert (get_type_mode(tp) == get_irn_mode(node));
+ assert (!tarval_is_entity(get_Const_tarval(node)) ||
+ (is_pointer_type(tp) &&
+ (get_pointer_points_to_type(tp) ==
+ get_entity_type(get_tarval_entity(get_Const_tarval(node))))));
+ }
+
+ node->attr.con.tp = tp;
+}
+
+
INLINE symconst_kind
get_SymConst_kind (const ir_node *node) {
assert (node->op == op_SymConst);
INLINE tarval *get_Const_tarval (ir_node *node);
INLINE void set_Const_tarval (ir_node *node, tarval *con);
+/* The source language type. Must be an atomic type. Mode of type must
+ be mode of node. For tarvals from entities type must be pointer to
+ entity type. */
+INLINE type *get_Const_type (ir_node *node);
+INLINE void set_Const_type (ir_node *node, type *tp);
/** This enum names the three different kinds of symbolic Constants
represented by SymConst. The content of the attribute type_or_id
#define DDMT(X) printf("%s(l.%i) %s %s: %ld (%p)\n", __MYFUNC__, __LINE__, get_type_tpop_name(X), get_type_name(X), get_type_nr(X), (void *)(X))
/** Output information about an entity */
#define DDME(X) printf("%s(l.%i) %s: %ld (%p)\n", __MYFUNC__, __LINE__, get_entity_name(X), get_entity_nr(X), (void *)(X))
+/** Output information about an entity and its type */
+#define DDMET(X) printf("%s(l.%i) %s (typ: %s): %ld (%p)\n", __MYFUNC__, __LINE__, get_entity_name(X), get_type_name(get_entity_type(X)), get_entity_nr(X), (void *)(X))
/** Output information about an entity and its owner */
#define DDMEO(X) printf("%s(l.%i) %s (own: %s): %ld (%p)\n", __MYFUNC__, __LINE__, get_entity_name(X), get_type_name(get_entity_owner(X)), get_entity_nr(X), (void *)(X))
/** Output information about a graph */
typedef struct {
cond_kind kind; /**< flavor of Cond */
long default_proj; /**< for optimization: biggest Proj number, i.e. the one
- used for default. */
+ used for default. */
} cond_attr;
+/** Const attributes */
+typedef struct {
+ tarval *tv; /**< the target value */
+ type *tp; /**< the source type, for analyses. default: type_unknown. */
+} const_attr;
+
/** SymConst attributes
This union contains the symbolic information represented by the node */
typedef union type_or_id {
- type *typ;
+ type *typ;
ident *ptrinfo;
} type_or_id;
start_attr start; /**< For Start */
block_attr block; /**< For Block: Fields needed to construct it */
cond_attr c; /**< For Cond. */
- struct tarval *con; /**< For Const: contains the value of the constant */
+ const_attr con; /**< For Const: contains the value of the constant and a type */
symconst_attr i; /**< For SymConst. */
sel_attr s; /**< For Sel. */
call_attr call; /**< For Call: pointer to the type of the method to call */
/*@{*/
/** access attributes directly */
-INLINE tarval *get_irn_const_attr (ir_node *node);
+INLINE const_attr get_irn_const_attr (ir_node *node);
INLINE long get_irn_proj_attr (ir_node *node);
INLINE alloc_attr get_irn_alloc_attr (ir_node *node);
INLINE type *get_irn_free_attr (ir_node *node);
op_Return= new_ir_op (iro_Return,"Return", pinned, 1, 0);
op_Raise = new_ir_op (iro_Raise, "Raise", pinned, 1, 0);
- op_Const = new_ir_op (iro_Const, "Const", floats, 0, sizeof (struct tarval *));
+ op_Const = new_ir_op (iro_Const, "Const", floats, 0, sizeof (const_attr));
op_SymConst = new_ir_op (iro_SymConst, "SymConst",
floats, 0, sizeof (symconst_attr));
case iro_Mod: {
ta = computed_value(n);
if (ta != tarval_bad) {
- /* Turn Div into a tuple (mem, bad, value) */
+ /* Turn Mod into a tuple (mem, bad, value) */
ir_node *mem = get_Mod_mem(n);
turn_into_tuple(n, 3);
set_Tuple_pred(n, 0, mem);
switch (get_irn_opcode(a)) {
case iro_Const:
- return get_irn_const_attr (a) != get_irn_const_attr (b);
+ return (get_Const_tarval(a) != get_Const_tarval(b))
+ || (get_Const_type(a) != get_Const_type(b));
case iro_Proj:
return get_irn_proj_attr (a) != get_irn_proj_attr (b);
case iro_Filter:
free_entity (entity *ent) {
free_tarval_entity(ent);
free_entity_attrs(ent);
+ ent->kind = k_BAD;
free(ent);
}
INLINE void
free_compound_graph_path (compound_graph_path *gr) {
assert(gr && is_compound_graph_path(gr));
+ gr->kind = k_BAD;
free(gr);
}
compound_graph_path *path;
assert(ent && is_compound_entity(ent) && (ent->variability != variability_uninitialized));
path = get_compound_ent_value_path(ent, pos);
- assert(path->len == 1);
return get_compound_graph_path_node(path, get_compound_graph_path_length(path)-1);
}
if (is_array_type(tp))
free_entity(get_array_element_entity(tp));
/* And now the type itself... */
+ tp->kind = k_BAD;
free(tp);
}
/**
* Returns the associated entity of a tarval.
*/
+#define get_tarval_entity tarval_to_entity
entity *tarval_to_entity(tarval *tv);
/**
edge: { sourcename: "n18" targetname: "t16"label: "upper 0"}
edge: { sourcename: "n19" targetname: "t16"label: "lower 0"}
node: {title: "n18" label: "0x9Iu 18" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "n19" label: "0x0Iu 19" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t12" label: "primitive int" info1: "state: layout_fixed,
mode: Is,
edge: { sourcename: "e15" targetname: "t13"class: 3 label: "type" color: red}
edge: { sourcename: "e15" targetname: "n14"label: "value 0"}
node: {title: "n14" label: "&(GlobalType_ARRAY-HEAP_EXAMPLE_main)P 14" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t0" label: "class GlobalType" info1: "state: layout_undefined
size: -1B,
start of method of type ARRAY-HEAP_EXAMPLE_main
"}
node: {title: "n58" label: "0x3Iu 58" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n61" label: "0x28Iu 61" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n62" label: "ProjM 1 62" color: yellow info1: "visited: 10
"}
start of method of type main
"}
node: {title: "n56" label: "0x3Iu 56" color: yellow info1: "visited: 15
+Const of type type_unknown
"}
node: {title: "n58" label: "ProjP 2 58" color: yellow info1: "visited: 15
"}
edge: { sourcename: "n19" targetname: "t17"label: "upper 0"}
edge: { sourcename: "n20" targetname: "t17"label: "lower 0"}
node: {title: "n19" label: "0x9Iu 19" color: yellow info1: "visited: 2
+Const of type type_unknown
"}
node: {title: "n20" label: "0x0Iu 20" color: yellow info1: "visited: 2
+Const of type type_unknown
"}
node: {title: "t12" label: "primitive int" info1: "state: layout_fixed,
mode: Is,
edge: { sourcename: "e16" targetname: "t14"class: 3 label: "type" color: red}
edge: { sourcename: "e16" targetname: "n15"label: "value 0"}
node: {title: "n15" label: "&(ARRAY-STACK_EXAMPLE_main)P 15" color: yellow info1: "visited: 2
+Const of type type_unknown
"}
node: {title: "t13" label: "class ARRAY-STACK_EXAMPLE" info1: "state: layout_undefined
size: -1B,
edge: { sourcename: "e18" targetname: "t16"class: 3 label: "type" color: red}
edge: { sourcename: "e18" targetname: "n17"label: "value 0"}
node: {title: "n17" label: "&(PRIMA_set_a)P 17" color: yellow info1: "visited: 4
+Const of type type_unknown
"}
node: {title: "t16" label: "method set_a" info1: "state: layout_fixed,
mode: P,
edge: { sourcename: "e21" targetname: "t19"class: 3 label: "type" color: red}
edge: { sourcename: "e21" targetname: "n20"label: "value 0"}
node: {title: "n20" label: "&(PRIMA_c)P 20" color: yellow info1: "visited: 4
+Const of type type_unknown
"}
node: {title: "t19" label: "method c" info1: "state: layout_fixed,
mode: P,
edge: { sourcename: "e24" targetname: "t22"class: 3 label: "type" color: red}
edge: { sourcename: "e24" targetname: "n23"label: "value 0"}
node: {title: "n23" label: "&(GlobalType_OO_INLINE_EXAMPLE_main)P 23" color: yellow info1: "visited: 4
+Const of type type_unknown
"}
}
start of method of type CALL_STR_EXAMPLE_main
"}
node: {title: "n64" label: "&(GlobalType_constStr)P 64" color: yellow info1: "visited: 8
+Const of type ptr_to_string
"}
node: {title: "n65" label: "SymC f 65" info1: "visited: 8
"}
param 0 type: int
"}
node: {title: "n72" label: "0x0Is 72" color: yellow info1: "visited: 12
+Const of type type_unknown
"}
node: {title: "n77" label: "0xAIs 77" color: yellow info1: "visited: 12
+Const of type type_unknown
"}
node: {title: "n79" label: "ProjT 4 79" color: yellow info1: "visited: 12
"}
edge: {sourcename: "n79" targetname: "n68" label: "0" }
node: {title: "n83" label: "0x2Is 83" color: yellow info1: "visited: 12
+Const of type type_unknown
"}
node: {title: "n88" label: "0x1Is 88" color: yellow info1: "visited: 12
+Const of type type_unknown
"}
node: {title: "n89" label: "ProjM 1 89" color: yellow info1: "visited: 12
"}
start of method of type main
"}
node: {title: "n52" label: "0xCIs 52" color: yellow info1: "visited: 6
+Const of type type_unknown
"}
node: {title: "n53" label: "ProjM 1 53" color: yellow info1: "visited: 6
"}
start of method of type main
"}
node: {title: "n76" label: "0x2Is 76" color: yellow info1: "visited: 11
+Const of type type_unknown
"}
node: {title: "n77" label: "ProjM 1 77" color: yellow info1: "visited: 11
"}
param 0 type: int
"}
node: {title: "n91" label: "0x1Is 91" color: yellow info1: "visited: 22
+Const of type type_unknown
"}
node: {title: "n93" label: "ProjT 4 93" color: yellow info1: "visited: 22
"}
edge: {sourcename: "n76" targetname: "n78" label: "0" }
edge: {sourcename: "n76" targetname: "n77" label: "1" }
node: {title: "n77" label: "0x2Is 77" color: yellow info1: "visited: 18
+Const of type type_unknown
"}
node: {title: "n78" label: "ProjIs 0 78" color: yellow info1: "visited: 18
"}
edge: {sourcename: "n84" targetname: "n78" label: "0" }
edge: {sourcename: "n84" targetname: "n85" label: "1" }
node: {title: "n85" label: "0x3Is 85" color: yellow info1: "visited: 18
+Const of type type_unknown
"}
node: {title: "n86" label: "AddIs 86" info1: "visited: 18
"}
edge: {sourcename: "n86" targetname: "n84" label: "0" }
edge: {sourcename: "n86" targetname: "n87" label: "1" }
node: {title: "n87" label: "0x5Is 87" color: yellow info1: "visited: 18
+Const of type type_unknown
"}
node: {title: "n88" label: "ProjM 1 88" color: yellow info1: "visited: 18
"}
edge: {sourcename: "n47" targetname: "n49" label: "1" }
edge: {sourcename: "n47" targetname: "n48" label: "2" }
node: {title: "n48" label: "0x2Is 48" color: yellow info1: "visited: 11
+Const of type type_unknown
"}
edge: { sourcename: "n48" targetname: "n44" class: 2 priority: 2 linestyle: dotted}
node: {title: "n49" label: "Sel i 49" info1: "visited: 11
edge: { sourcename: "e15" targetname: "t13"class: 3 label: "type" color: red}
edge: { sourcename: "e15" targetname: "n14"label: "value 0"}
node: {title: "n14" label: "&(GlobalType_GLOBAL_VAR_main)P 14" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t13" label: "method GLOBAL_VAR_main" info1: "state: layout_fixed,
mode: P,
start of method of type GLOBAL_VAR_main
"}
node: {title: "n48" label: "0x2Is 48" color: yellow info1: "visited: 9
+Const of type type_unknown
"}
node: {title: "n50" label: "ProjP 3 50" color: yellow info1: "visited: 9
"}
start of method of type IF_ELSE_EXAMPLE_main
"}
node: {title: "n73" label: "0x2Is 73" color: yellow info1: "visited: 15
+Const of type type_unknown
"}
node: {title: "n74" label: "0x0Is 74" color: yellow info1: "visited: 15
+Const of type type_unknown
"}
node: {title: "n75" label: "ProjM 1 75" color: yellow info1: "visited: 15
"}
param 0 type: int
"}
node: {title: "n31" label: "0x2Is 31" color: yellow info1: "visited: 12
+Const of type type_unknown
"}
node: {title: "n27" label: "ProjT 4 27" color: yellow info1: "visited: 12
"}
edge: {sourcename: "n27" targetname: "n20" label: "0" }
node: {title: "n38" label: "0x3Is 38" color: yellow info1: "visited: 12
+Const of type type_unknown
"}
node: {title: "n24" label: "ProjM 1 24" color: yellow info1: "visited: 12
"}
"}
edge: {sourcename: "n88" targetname: "n89" label: "0" color: red}
node: {title: "n87" label: "0x0Iu 87" color: yellow info1: "visited: 14
+Const of type type_unknown
"}
edge: { sourcename: "n87" targetname: "n88" class: 2 priority: 2 linestyle: dotted}
node: {title: "n86" label: "CmpT 86" info1: "visited: 14
"}
edge: {sourcename: "n78" targetname: "n79" label: "0" color: red}
node: {title: "n96" label: "0x0Iu 96" color: yellow info1: "visited: 14
+Const of type type_unknown
"}
edge: { sourcename: "n96" targetname: "n88" class: 2 priority: 2 linestyle: dotted}
node: {title: "n95" label: "PhiIu 95" color: green info1: "visited: 14
edge: {sourcename: "n95" targetname: "n96" label: "0" }
edge: {sourcename: "n95" targetname: "n94" label: "1" }
node: {title: "n97" label: "0x1Iu 97" color: yellow info1: "visited: 14
+Const of type type_unknown
"}
edge: { sourcename: "n97" targetname: "n88" class: 2 priority: 2 linestyle: dotted}
node: {title: "n94" label: "PhiIu 94" color: green info1: "visited: 14
start of method of type main
"}
node: {title: "n80" label: "0x1Is 80" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n81" label: "0x0Is 81" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n88" label: "0x2Is 88" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n92" label: "ProjM 1 92" color: yellow info1: "visited: 10
"}
graph: { title: "n74" label: "74" status:clustered color:yellow
edge: {sourcename: "n74" targetname: "n75" label: "0" color: red}
node: {title: "n73" label: "0x2Is 73" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n75" label: "ProjX 0 75" color: yellow info1: "visited: 10
"}
start of method of type main
"}
node: {title: "n77" label: "0x0Is 77" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n83" label: "0x1Is 83" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n92" label: "ProjM 1 92" color: yellow info1: "visited: 10
"}
"}
edge: {sourcename: "n95" targetname: "n93" label: "0" color: blue}
node: {title: "n108" label: "0x1Iu 108" color: yellow info1: "visited: 19
+Const of type type_unknown
"}
node: {title: "n111" label: "0x0Iu 111" color: yellow info1: "visited: 19
+Const of type type_unknown
"}
}
node: {title: "n202" label: "Jmp 202" info1: "visited: 28
"}
node: {title: "n208" label: "0x0Is 208" color: yellow info1: "visited: 28
+Const of type type_unknown
"}
node: {title: "n211" label: "ProjP 2 211" color: yellow info1: "visited: 28
"}
start of method of type OO_INLINE_EXAMPLE_main
"}
node: {title: "n209" label: "0x5Is 209" color: yellow info1: "visited: 29
+Const of type type_unknown
"}
node: {title: "n213" label: "SymC PRIMA size 213" info1: "visited: 29
"}
"}
edge: {sourcename: "n214" targetname: "n199" label: "0" color: blue}
node: {title: "n217" label: "0x2Is 217" color: yellow info1: "visited: 29
+Const of type type_unknown
"}
}
edge: { sourcename: "e18" targetname: "t16"class: 3 label: "type" color: red}
edge: { sourcename: "e18" targetname: "n17"label: "value 0"}
node: {title: "n17" label: "&(PRIMA_set_a)P 17" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t16" label: "method set_a" info1: "state: layout_fixed,
mode: P,
edge: { sourcename: "e21" targetname: "t19"class: 3 label: "type" color: red}
edge: { sourcename: "e21" targetname: "n20"label: "value 0"}
node: {title: "n20" label: "&(PRIMA_c)P 20" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t19" label: "method c" info1: "state: layout_fixed,
mode: P,
edge: { sourcename: "e24" targetname: "t22"class: 3 label: "type" color: red}
edge: { sourcename: "e24" targetname: "n23"label: "value 0"}
node: {title: "n23" label: "&(GlobalType_OO_INLINE_EXAMPLE_main)P 23" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t0" label: "class GlobalType" info1: "state: layout_undefined
size: -1B,
node: {title: "n202" label: "Jmp 202" info1: "visited: 23
"}
node: {title: "n208" label: "0x0Is 208" color: yellow info1: "visited: 23
+Const of type type_unknown
"}
node: {title: "n211" label: "ProjP 2 211" color: yellow info1: "visited: 23
"}
start of method of type OO_INLINE_EXAMPLE_main
"}
node: {title: "n209" label: "0x5Is 209" color: yellow info1: "visited: 24
+Const of type type_unknown
"}
node: {title: "n213" label: "SymC PRIMA size 213" info1: "visited: 24
"}
"}
edge: {sourcename: "n214" targetname: "n199" label: "0" color: blue}
node: {title: "n217" label: "0x2Is 217" color: yellow info1: "visited: 24
+Const of type type_unknown
"}
}
start of method of type OO_PROGRAM_EXAMPLE_main
"}
node: {title: "n117" label: "0x5Is 117" color: yellow info1: "visited: 21
+Const of type type_unknown
"}
node: {title: "n120" label: "SymC PRIMA size 120" info1: "visited: 21
"}
"}
edge: {sourcename: "n121" targetname: "n113" label: "0" color: blue}
node: {title: "n125" label: "0x2Is 125" color: yellow info1: "visited: 21
+Const of type type_unknown
"}
}
edge: { sourcename: "e18" targetname: "t16"class: 3 label: "type" color: red}
edge: { sourcename: "e18" targetname: "n17"label: "value 0"}
node: {title: "n17" label: "&(PRIMA_set_a)P 17" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t16" label: "method set_a" info1: "state: layout_fixed,
mode: P,
edge: { sourcename: "e21" targetname: "t19"class: 3 label: "type" color: red}
edge: { sourcename: "e21" targetname: "n20"label: "value 0"}
node: {title: "n20" label: "&(PRIMA_c)P 20" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "e24" label: "ent OO_PROGRAM_EXAMPLE_main" color: yellow
info1: "
edge: { sourcename: "e24" targetname: "t22"class: 3 label: "type" color: red}
edge: { sourcename: "e24" targetname: "n23"label: "value 0"}
node: {title: "n23" label: "&(GlobalType_OO_PROGRAM_EXAMPLE_main)P 23" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t0" label: "class GlobalType" info1: "state: layout_undefined
size: -1B,
start of method of type OO_PROGRAM_EXAMPLE_main
"}
node: {title: "n117" label: "0x5Is 117" color: yellow info1: "visited: 17
+Const of type type_unknown
"}
node: {title: "n120" label: "SymC PRIMA size 120" info1: "visited: 17
"}
"}
edge: {sourcename: "n121" targetname: "n113" label: "0" color: blue}
node: {title: "n125" label: "0x2Is 125" color: yellow info1: "visited: 17
+Const of type type_unknown
"}
}
param 1 type: int
"}
node: {title: "n256" label: "0x0Is 256" color: yellow info1: "visited: 29
+Const of type type_unknown
"}
node: {title: "n258" label: "ProjT 4 258" color: yellow info1: "visited: 29
"}
edge: { sourcename: "e18" targetname: "t16"class: 3 label: "type" color: red}
edge: { sourcename: "e18" targetname: "n17"label: "value 0"}
node: {title: "n17" label: "&(PRIMA_set_a)P 17" color: yellow info1: "visited: 3
+Const of type type_unknown
"}
node: {title: "t16" label: "method set_a" info1: "state: layout_fixed,
mode: P,
edge: { sourcename: "e21" targetname: "t19"class: 3 label: "type" color: red}
edge: { sourcename: "e21" targetname: "n20"label: "value 0"}
node: {title: "n20" label: "&(PRIMA_c)P 20" color: yellow info1: "visited: 3
+Const of type type_unknown
"}
node: {title: "t19" label: "method c" info1: "state: layout_fixed,
mode: P,
edge: { sourcename: "e18" targetname: "t16"class: 3 label: "type" color: red}
edge: { sourcename: "e18" targetname: "n17"label: "value 0"}
node: {title: "n17" label: "&(PRIMA_set_a)P 17" color: yellow info1: "visited: 2
+Const of type type_unknown
"}
node: {title: "t16" label: "method set_a" info1: "state: layout_fixed,
mode: P,
edge: { sourcename: "e21" targetname: "t19"class: 3 label: "type" color: red}
edge: { sourcename: "e21" targetname: "n20"label: "value 0"}
node: {title: "n20" label: "&(PRIMA_c)P 20" color: yellow info1: "visited: 2
+Const of type type_unknown
"}
node: {title: "t19" label: "method c" info1: "state: layout_fixed,
mode: P,
"}
edge: {sourcename: "n93" targetname: "n88" label: "0" }
node: {title: "n94" label: "0x1Is 94" color: yellow info1: "visited: 13
+Const of type type_unknown
"}
node: {title: "n98" label: "0x3Is 98" color: yellow info1: "visited: 13
+Const of type type_unknown
"}
node: {title: "n106" label: "0x6Is 106" color: yellow info1: "visited: 13
+Const of type type_unknown
"}
node: {title: "n107" label: "0x5Is 107" color: yellow info1: "visited: 13
+Const of type type_unknown
"}
node: {title: "n108" label: "ProjM 1 108" color: yellow info1: "visited: 13
"}
"}
edge: {sourcename: "n85" targetname: "n84" label: "0" }
node: {title: "n86" label: "0x1Is 86" color: yellow info1: "visited: 20
+Const of type type_unknown
"}
node: {title: "n87" label: "0x0Is 87" color: yellow info1: "visited: 20
+Const of type type_unknown
"}
node: {title: "n90" label: "ProjM 1 90" color: yellow info1: "visited: 20
"}
param 1 type: int
"}
node: {title: "n256" label: "0x0Is 256" color: yellow info1: "visited: 24
+Const of type type_unknown
"}
node: {title: "n258" label: "ProjT 4 258" color: yellow info1: "visited: 24
"}
edge: { sourcename: "n19" targetname: "t17"label: "upper 0"}
edge: { sourcename: "n20" targetname: "t17"label: "lower 0"}
node: {title: "n19" label: "0x9Iu 19" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "n20" label: "0x0Iu 20" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t12" label: "primitive int" info1: "state: layout_fixed,
mode: Is,
edge: { sourcename: "e16" targetname: "t14"class: 3 label: "type" color: red}
edge: { sourcename: "e16" targetname: "n15"label: "value 0"}
node: {title: "n15" label: "&(ARRAY-STACK_EXAMPLE_main)P 15" color: yellow info1: "visited: 1
+Const of type type_unknown
"}
node: {title: "t13" label: "class ARRAY-STACK_EXAMPLE" info1: "state: layout_undefined
size: -1B,
start of method of type main
"}
node: {title: "n56" label: "0x3Iu 56" color: yellow info1: "visited: 10
+Const of type type_unknown
"}
node: {title: "n58" label: "ProjP 2 58" color: yellow info1: "visited: 10
"}