Commit b4a3d847 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Indentation.

[r22302]
parent c71681c2
......@@ -1148,9 +1148,9 @@ static unsigned optimize_load(ir_node *load)
value = NULL;
/* check if we can determine the entity that will be loaded */
ent = find_constant_entity(ptr);
if (ent != NULL) {
if ((allocation_static == get_entity_allocation(ent)) &&
(visibility_external_allocated != get_entity_visibility(ent))) {
if (ent != NULL &&
allocation_static == get_entity_allocation(ent) &&
visibility_external_allocated != get_entity_visibility(ent)) {
/* a static allocation that is not external: there should be NO exception
* when loading even if we cannot replace the load itself. */
......@@ -1168,16 +1168,12 @@ static unsigned optimize_load(ir_node *load)
if (variability_constant == get_entity_variability(ent)) {
if (is_atomic_entity(ent)) {
/* Might not be atomic after
lowering of Sels. In this
case we could also load, but
it's more complicated. */
/* Might not be atomic after lowering of Sels. In this case we
* could also load, but it's more complicated. */
/* more simpler case: we load the content of a constant value:
* replace it by the constant itself
*/
* replace it by the constant itself */
value = get_atomic_ent_value(ent);
} else {
if (ent->has_initializer) {
} else if (ent->has_initializer) {
/* new style initializer */
value = find_compound_ent_value(ptr);
} else {
......@@ -1192,13 +1188,11 @@ static unsigned optimize_load(ir_node *load)
free_compound_graph_path(path);
}
}
}
if (value != NULL)
value = can_replace_load_by_const(load, value);
}
}
}
}
if (value != NULL) {
/* we completely replace the load by this value */
if (info->projs[pn_Load_X_except]) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment