-}
-
-/**
- * Handle Loads, that were been scalar replaced or
- * will be scalar replaced.
- *
- * @param *load A load node.
- * @param *env Contains information about scalars number and mode.
- * @parm *repairs A set, that contains all blocks, that have a link, and all Phis, that
- * have copies to repair.
- *
- */
-
-static void load_handling(ir_node *load, env_t *env, set *repairs)
-{
- repairs_t key, *value;
- ir_node * load_ptr, *load_mem, *nods_block;
- nods_block = get_nodes_block(load);
- load_ptr = get_Load_ptr(load);
- load_mem = get_Load_mem(load);
- // DDMN(load);
- /* The pointer predecessor of Load muss be a Sel node. */
- if(get_irn_op(load_ptr) == op_Sel){
- /* If the link field of sel's entity is set to "ADDRESS_TAKEN", that mean this value
- can't be scalar replaced.It is nothing to do and "load_handling" muss be exit.*/
- if ( get_entity_link(get_Sel_entity(load_ptr)) == ADDRESS_TAKEN)
- return;
-
- key.irn = nods_block;
- value = set_find(repairs, &key, sizeof(key), HASH_PTR(nods_block));
- /* Load's pointer predecessor's link field contains the position in the block's link, where
- muss be searched the predecessor of this load.*/
- unsigned i = (unsigned)get_irn_link(load_ptr);
-
- /* If the link of Load's block doasn't contains at position "i" a node or isn't calculated,
- than muss be called "pred_search".*/
- if (value == NULL){
- block_link(load, env, repairs);
- key.irn = nods_block;
- value = set_find(repairs, &key, sizeof(key), HASH_PTR(nods_block));
- pred_search(load, value, repairs, i, 0);
- }else
- if(value->link[i] == NULL)
- pred_search(load, value, repairs, i, 0);
-
- /* If afte "pred_search" call the link of Load's block at position "i" is equal to "NULL",
- that means the loading value weren't be initialise and the load predecessor be set to "Unknown"*/
- if(value->link[i] == NULL)
- value->link[i] = new_Unknown(env->modes[i]);
- /* The load node can be turned to tupel now. The tupel will bi optimized later. */
- turn_into_tuple(load, pn_Load_max);
- set_Tuple_pred(load, pn_Load_M, load_mem);
- set_Tuple_pred(load, pn_Load_res, value->link[i]);
- set_Tuple_pred(load, pn_Load_X_except, new_Bad());