- value = get_Store_value(succ);
- if (value == irn)
- return ir_address_taken;
- /* check if this Store is not a hidden conversion */
- mode = get_irn_mode(value);
- ent = is_SymConst(irn) ? get_SymConst_entity(irn) : get_Sel_entity(irn);
- emode = get_type_mode(get_entity_type(ent));
- if (is_hidden_cast(mode, emode))
- return ir_address_taken;
+ if (irn == get_Store_value(succ)) {
+ res |= ir_usage_unknown;
+ }
+ if (irn == get_Store_ptr(succ)) {
+ res |= ir_usage_write;
+
+ /* check if this Store is not a hidden conversion */
+ value = get_Store_value(succ);
+ mode = get_irn_mode(value);
+ emode = get_type_mode(get_entity_type(entity));
+ if (is_hidden_cast(mode, emode))
+ res |= ir_usage_reinterpret_cast;
+ }
+ assert(irn != get_Store_mem(succ));
+ break;
+
+ case iro_CopyB:
+ /* CopyB are like Loads/Stores */
+ tp = get_entity_type(entity);
+ if (tp != get_CopyB_type(succ)) {
+ /* bad, different types, might be a hidden conversion */
+ res |= ir_usage_reinterpret_cast;
+ }
+ if (irn == get_CopyB_dst(succ)) {
+ res |= ir_usage_write;
+ } else {
+ assert(irn == get_CopyB_src(succ));
+ res |= ir_usage_read;
+ }