/** Verbosity for text dumpers */
typedef enum {
- dump_verbosity_onlynames = 0x00000001, /**< only dump type names. turns off all other
+ dump_verbosity_onlynames = 0x00000001, /**< only dump names. turns off all other
flags up to 0x00010000. */
dump_verbosity_fields = 0x00000002, /**< dump types and fields (like a type declaration) */
dump_verbosity_methods = 0x00000004, /**< dump types and methods (like a type declaration) */
dump_verbosity_entattrs = 0x00000010, /**< dump all entity attributes */
dump_verbosity_entconsts = 0x00000020, /**< dump entity constants */
+ dump_verbosity_accessStats = 0x00000100, /**< dump entity access statistics */
+
dump_verbosity_noClassTypes = 0x00001000, /**< dump no class types */
dump_verbosity_noStructTypes = 0x00002000, /**< dump no struct types */
dump_verbosity_noUnionTypes = 0x00004000, /**< dump no union types */
dump_verbosity_onlyPrimitiveTypes = 0x000BF000, /**< dump only primitive types */
dump_verbosity_onlyEnumerationTypes=0x0008F000, /**< dump only enumeration types */
- dump_verbosity_max = 0x48888887, /**< turn on all verbosity. */
+ dump_verbosity_max = 0x48888887 /**< turn on all verbosity. */
} dump_verbosity;
#include "irprog_t.h"
#include "entity_t.h"
+#include "field_temperature.h"
+
int dump_node_opcode(FILE *F, ir_node *n); /* from irdump.c */
X(variability_constant);
}
fprintf(F, "\n");
- } else { /* no entityattrs */
+ } else { /* no entattrs */
fprintf(F, "%s(%3d) %*s: %s", prefix,
get_entity_offset_bits(ent), -40, get_type_name(get_entity_type(ent)), get_entity_name(ent));
if (is_method_type(get_entity_type(ent))) fprintf(F, "(...)");
+
+ if (verbosity & dump_verbosity_accessStats) {
+ if (get_entity_allocation(ent) == allocation_static) {
+ fprintf(F, " (stat)");
+ } else {
+ if (get_entity_peculiarity(ent) == peculiarity_description) fprintf(F, " (desc)");
+ if (get_entity_peculiarity(ent) == peculiarity_inherited) fprintf(F, " (inh)");
+ }
+ }
fprintf(F, "\n");
}
}
fprintf(F, "\n");
}
+
+ if (verbosity & dump_verbosity_accessStats) {
+ int n_acc = get_entity_n_accesses(ent);
+ fprintf(F, "%s Access Stats", prefix);
+ char comma = ':';
+ for (i = 0; i < n_acc; ++i) {
+ ir_node *acc = get_entity_access(ent, i);
+ if (get_irn_op(acc) == op_Load) {
+ fprintf(F, "%c L", comma);
+ } else if (get_irn_op(acc) == op_Store) {
+ fprintf(F, "%c S", comma);
+ } else {
+ assert(0);
+ }
+ fprintf(F, " %d", get_weighted_loop_depth(acc));
+ comma = ',';
+ }
+ fprintf(F, "\n");
+ }
+
+
}
#undef X
for (i = 0; i < n_types; ++i) {
type *t = get_irp_type(i);
+
+ if (is_jack_rts_class(t)) continue;
+
dump_type_to_file(F, t, verbosity);
}
set_irn_n(node, pos, pred);
}
+
+int is_memop(ir_node *node) {
+ return ((get_irn_op(node) == op_Load) || (get_irn_op(node) == op_Load));
+}
+
+ir_node *get_memop_mem (ir_node *node) {
+ assert(is_memop(node));
+ return get_irn_n(node, 0);
+}
+
+void set_memop_mem (ir_node *node, ir_node *mem) {
+ assert(is_memop(node));
+ set_irn_n(node, 0, mem);
+}
+
+ir_node *get_memop_ptr (ir_node *node) {
+ assert(is_memop(node));
+ return get_irn_n(node, 1);
+}
+
+void set_memop_ptr (ir_node *node, ir_node *ptr) {
+ assert(is_memop(node));
+ set_irn_n(node, 1, ptr);
+}
+
ir_node *
get_Load_mem (ir_node *node) {
assert (node->op == op_Load);
int get_Filter_n_cg_preds(ir_node *node);
ir_node *get_Filter_cg_pred(ir_node *node, int pos);
+/** Return true if parameter is a memory operation.
+ *
+ * A memory operation is an operation that directly changes the
+ * memory. I.e., a Load or a Store operation.
+ */
+int is_memop(ir_node *node);
+ir_node *get_memop_mem (ir_node *node);
+void set_memop_mem (ir_node *node, ir_node *mem);
+ir_node *get_memop_ptr (ir_node *node);
+void set_memop_ptr (ir_node *node, ir_node *ptr);
+
/**
* Projection numbers for Load: use for Proj nodes!
*/