-/* Since we *know* that this entity will not be called, this is OK. */
-static void force_description (entity *ent, entity *addr)
-{
- int i, n_over = get_entity_n_overwrittenby (ent);
-
- set_entity_peculiarity (ent, peculiarity_description);
-
- for (i = 0; i < n_over; i ++) {
- entity *over = get_entity_overwrittenby (ent, i);
-
- if (peculiarity_inherited == get_entity_peculiarity (over)) {
- /* We rely on the fact that cse is performed on the const_code_irg. */
- entity *my_addr = get_SymConst_entity(get_atomic_ent_value(over));
-
- if (addr == my_addr) {
- force_description (over, addr);
- }
- } else if (peculiarity_existent == get_entity_peculiarity (over)) {
- /* check whether 'over' forces 'inheritance' of *our* graph: */
- ir_node *f_addr = get_atomic_ent_value (over);
- entity *impl_ent = get_SymConst_entity (f_addr);
-
- assert ((get_irn_op(f_addr) == op_SymConst) && "can't do complex addrs");
- if (impl_ent == addr) {
- assert (0 && "gibt's denn sowas");
- force_description (over, addr);
- }
- }
- }
-}
-
-/* remove a graph, part II */
-/*
- Note: get_implementing_graph is not well defined here (graph->ent
- could overwrite more than one superclass implementation (graph).
- Since we *know* that this entity will not be called, this is OK.
-*/
-static void remove_irg (ir_graph *graph)
-{
- entity *ent = get_irg_entity (graph);
- peculiarity pec = get_entity_peculiarity (ent);
-
- /* DDMEO (get_irg_entity(graph)); */
-
- /* delete the ir_graph data */
- set_entity_peculiarity (ent, peculiarity_description);
- remove_irp_irg (graph);
- /* remove_irp_irg also removes the entities' reference to the graph */
- /*
- if (NULL != get_entity_irg (ent)) {
- set_entity_irg (ent, NULL);
- }
- */
- set_entity_peculiarity (ent, pec);
-
- /* find the implementation (graph) from *some* superclass: */
- graph = get_implementing_graph (ent);
-
- if (TRUE || (NULL == graph)) { /* always pretend to be 'abstract'; let the others figure this out */
- /* nothing to inherit! pretend we're abstract */
- force_description (ent, ent);
- } else {
- /* pretend that we inherit the implementation (graph) from some superclass: */
- set_entity_peculiarity (ent, peculiarity_inherited);
-
- exchange (get_atomic_ent_value (ent),
- get_atomic_ent_value (get_irg_entity(graph)));
- }
-}