summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndreas Fried <andi@0xaf.de>2013-07-19 16:33:47 +0200
committerAndreas Fried <andi@0xaf.de>2013-07-19 16:34:17 +0200
commit70111d2a3c6f55451c05518850690357c46166a8 (patch)
tree20090b06d71d952a70286f625a9b0b7bb501161e
parenta859132dbf2dfeb081bbfb03e4a701379703d173 (diff)
Provide all CopyB constructors with a volatility flag.volatile_CopyB
-rw-r--r--ast2firm.c12
m---------libfirm0
2 files changed, 7 insertions, 5 deletions
diff --git a/ast2firm.c b/ast2firm.c
index 1c7b41b..fb49138 100644
--- a/ast2firm.c
+++ b/ast2firm.c
@@ -1643,16 +1643,16 @@ static void assign_value(dbg_info *dbgi, ir_node *addr, type_t *type,
value = conv_to_storage_type(dbgi, value, type);
ir_node *memory = get_store();
+ ir_cons_flags flags = type->base.qualifiers & TYPE_QUALIFIER_VOLATILE
+ ? cons_volatile : cons_none;
if (is_type_scalar(type) && !is_type_complex(type)) {
- ir_cons_flags flags = type->base.qualifiers & TYPE_QUALIFIER_VOLATILE
- ? cons_volatile : cons_none;
ir_node *store = new_d_Store(dbgi, memory, addr, value, flags);
ir_node *store_mem = new_d_Proj(dbgi, store, mode_M, pn_Store_M);
set_store(store_mem);
} else {
ir_type *irtype = get_ir_type(type);
- ir_node *copyb = new_d_CopyB(dbgi, memory, addr, value, irtype);
+ ir_node *copyb = new_d_CopyB(dbgi, memory, addr, value, irtype, flags);
set_store(copyb);
}
}
@@ -4878,7 +4878,7 @@ static void create_dynamic_initializer_sub(ir_initializer_t *initializer,
ir_node *mem = get_store();
ir_node *new_mem;
if (is_compound_type(ent_type)) {
- new_mem = new_d_CopyB(dbgi, mem, base_addr, node, ent_type);
+ new_mem = new_d_CopyB(dbgi, mem, base_addr, node, ent_type, cons_none);
} else {
assert(get_type_mode(type) == get_irn_mode(node));
ir_node *store = new_d_Store(dbgi, mem, base_addr, node, cons_none);
@@ -4992,7 +4992,9 @@ static void create_local_initializer(initializer_t *initializer, dbg_info *dbgi,
= create_initializer_entity(dbgi, initializer, type);
ir_node *const src_addr = create_symconst(dbgi, init_entity);
ir_type *const irtype = get_ir_type(type);
- ir_node *const copyb = new_d_CopyB(dbgi, memory, addr, src_addr, irtype);
+ ir_cons_flags flags = get_entity_volatility(entity) == volatility_is_volatile ?
+ cons_volatile : cons_none;
+ ir_node *const copyb = new_d_CopyB(dbgi, memory, addr, src_addr, irtype, flags);
set_store(copyb);
}
diff --git a/libfirm b/libfirm
-Subproject ba38d76b2c19e985e1405df3392ddc1aaead0fd
+Subproject d5d04f218099affc982f09c731a4779228f0011