From 8d4189c67b88556b13e81e6dee9178f8b1168d28 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 16 Oct 2006 11:01:38 +0000 Subject: [PATCH] used is_final_ent() instead of *_n_overwrites == 0 [r8348] --- ir/opt/opt_polymorphy.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ir/opt/opt_polymorphy.c b/ir/opt/opt_polymorphy.c index b2e9716f6..776be8e8b 100644 --- a/ir/opt/opt_polymorphy.c +++ b/ir/opt/opt_polymorphy.c @@ -2,12 +2,15 @@ * Project: libFIRM * File name: ir/opt/opt_polymorphy * Purpose: Optimize polymorphic Sel nodes. - * Author: + * Author: Goetz Lindenmaier, Michael Beck * Created: * CVS-ID: $Id$ * Copyright: (c) 2005 Universität Karlsruhe * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "irprog_t.h" #include "entity_t.h" @@ -182,7 +185,7 @@ ir_node *transform_node_Load(ir_node *n) /* If the entity is a leave in the inheritance tree, we can replace the Sel by a constant. */ - if ((get_irp_phase_state() != phase_building) && (get_entity_n_overwrittenby(ent) == 0)) { + if ((get_irp_phase_state() != phase_building) && is_final_ent(ent)) { new_node = copy_const_value(get_irn_dbg_info(n), get_atomic_ent_value(ent)); DBG_OPT_POLY(field_ptr, new_node); -- 2.20.1