+void
+remove_compound_ent_value(entity *ent, entity *value_ent) {
+ int i;
+ assert(ent && is_compound_entity(ent) && (ent->variability != variability_uninitialized));
+ for (i = 1; i < (ARR_LEN (ent->val_paths)); i++) {
+ compound_graph_path *path = ent->val_paths[i];
+ if (path->nodes[path->len-1] == value_ent) {
+ for(; i < (ARR_LEN (ent->val_paths))-1; i++) {
+ ent->val_paths[i] = ent->val_paths[i+1];
+ ent->values[i] = ent->values[i+1];
+ }
+ ARR_SETLEN(entity*, ent->val_paths, ARR_LEN(ent->val_paths) - 1);
+ ARR_SETLEN(ir_node*, ent->values, ARR_LEN(ent->values) - 1);
+ break;
+ }
+ }
+}
+
+INLINE void
+add_compound_ent_value(entity *ent, ir_node *val, entity *member) {
+ compound_graph_path *path;
+ assert(ent && is_compound_entity(ent) && (ent->variability != variability_uninitialized));
+ path = new_compound_graph_path(get_entity_owner(ent), 1);
+ path->nodes[0] = member;
+ add_compound_ent_value_w_path(ent, val, path);
+}
+
+/* Copies the firm subgraph referenced by val to const_code_irg and adds
+ the node as constant initialization to ent.
+ The subgraph may not contain control flow operations.
+INLINE void
+copy_and_add_compound_ent_value(entity *ent, ir_node *val, entity *member) {
+ ir_graph *rem = current_ir_graph;
+
+ assert(get_entity_variability(ent) != variability_uninitialized);
+ current_ir_graph = get_const_code_irg();
+
+ val = copy_const_value(val);
+ add_compound_ent_value(ent, val, member);
+ current_ir_graph = rem;
+ }*/
+
+/* Copies the value i of the entity to current_block in current_ir_graph.
+ir_node *
+copy_compound_ent_value(entity *ent, int pos) {
+ assert(ent && is_compound_entity(ent) && (ent->variability != variability_uninitialized));
+ return copy_const_value(ent->values[pos+1]);
+ }*/
+
+INLINE entity *