+ if ((get_entity_additional_properties(ent) & mtp_property_const) == 0)
+ return;
+ ++ctx->n_calls_removed_SymConst;
+ }
+ else if (is_Sel(ptr) &&
+ get_irg_callee_info_state(current_ir_graph) == irg_callee_info_consistent) {
+ /* If all possible callees are real functions, we can remove the memory edge. */
+ int i, n_callees = get_Call_n_callees(call);
+ if (n_callees == 0)
+ /* This is kind of strange: dying code or a Call that will raise an exception
+ when executed as there is no implementation to call. So better not
+ optimize. */
+ return;
+ for (i = 0; i < n_callees; ++i) {
+ ent = get_Call_callee(call, i);
+ if (ent == unknown_entity) {
+ /* we don't know which entity is called here */
+ return;
+ }
+ if ((get_entity_additional_properties(ent) & mtp_property_const) == 0)
+ return;
+ }
+ ++ctx->n_calls_removed_Sel;
+ }
+ else
+ return;