- if (info->projs[pn_Load_M])
- exchange(info->projs[pn_Load_M], mem);
- if (info->projs[pn_Load_res])
- exchange(info->projs[pn_Load_res], copy_const_value(c));
-
- {
- int j;
- for (j = 0; j < get_compound_graph_path_length(path); ++j) {
- entity *node = get_compound_graph_path_node(path, j);
- fprintf(stdout, ".%s", get_entity_name(node));
- if (is_Array_type(get_entity_owner(node)))
- fprintf(stdout, "[%d]", get_compound_graph_path_array_index(path, j));
- }
- printf("\n");
+ if (info->projs[pn_Load_M])
+ exchange(info->projs[pn_Load_M], mem);
+ if (info->projs[pn_Load_res])
+ exchange(info->projs[pn_Load_res], copy_const_value(c));
+ /*
+ {
+ int j;
+ for (j = 0; j < get_compound_graph_path_length(path); ++j) {
+ entity *node = get_compound_graph_path_node(path, j);
+ fprintf(stdout, ".%s", get_entity_name(node));
+ if (is_Array_type(get_entity_owner(node)))
+ fprintf(stdout, "[%d]", get_compound_graph_path_array_index(path, j));
+ }
+ printf("\n");
+ }
+ */
+ } else {
+ /* We can not determine a correct access path. E.g., in jack, we load
+ a byte from an object to generate an exception. Happens in test program
+ Reflectiontest.
+ printf(">>>>>>>>>>>>> Found access to constant entity %s in function %s\n", get_entity_name(ent),
+ get_entity_name(get_irg_entity(current_ir_graph)));
+ printf(" load: "); DDMN(load);
+ printf(" ptr: "); DDMN(ptr);
+ if (get_irn_op(ptr) == op_SymConst &&
+ get_SymConst_kind(ptr) == symconst_addr_ent) { printf(" "); DDMEO(get_SymConst_entity(ptr)); }
+ printf("cannot optimize.\n");
+ */