From cf204fd9d49e0cca078e929328be6f84c12776dd Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Sat, 20 Sep 2008 12:01:32 +0000 Subject: [PATCH] Bugfix: restructured so memory disambiguator can switched off [r22136] --- ir/ana/irmemory.c | 7 +++++-- ir/ana/irmemory_t.h | 35 +++++++++++++++++++++++++++++++++++ ir/common/firm.c | 3 +++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 ir/ana/irmemory_t.h diff --git a/ir/ana/irmemory.c b/ir/ana/irmemory.c index 00da7d99a..313b54a5d 100644 --- a/ir/ana/irmemory.c +++ b/ir/ana/irmemory.c @@ -33,6 +33,7 @@ #include "irnode_t.h" #include "irgraph_t.h" #include "irprog_t.h" +#include "irmemory_t.h" #include "irmemory.h" #include "irflag.h" #include "hashptr.h" @@ -1052,8 +1053,6 @@ static void check_global_address(ir_node *irn, void *env) { static void analyse_irp_globals_address_taken(void) { int i; - FIRM_DBG_REGISTER(dbg, "firm.ana.irmemory"); - init_taken_flag(get_glob_type()); init_taken_flag(get_tls_type()); @@ -1094,6 +1093,10 @@ void assure_irp_globals_address_taken_computed(void) { analyse_irp_globals_address_taken(); } /* assure_irp_globals_address_taken_computed */ +void firm_init_memory_disambiguator(void) { + FIRM_DBG_REGISTER(dbg, "firm.ana.irmemory"); +} + #include #include "typerep.h" diff --git a/ir/ana/irmemory_t.h b/ir/ana/irmemory_t.h new file mode 100644 index 000000000..3191301f8 --- /dev/null +++ b/ir/ana/irmemory_t.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + +/** + * @file + * @brief Memory disambiguator + * @author Michael Beck + * @date 27.12.2006 + * @version $Id: irmemory.c 22135 2008-09-20 05:32:02Z beck $ + */ +#ifndef FIRM_ANA_IRMEMORY_T_H +#define FIRM_ANA_IRMEMORY_T_H + +/** + * One-time inititialization of the memory< disambiguator. + */ +void firm_init_memory_disambiguator(void); + +#endif diff --git a/ir/common/firm.c b/ir/common/firm.c index 97edf99ab..d1ce4d610 100644 --- a/ir/common/firm.c +++ b/ir/common/firm.c @@ -63,6 +63,7 @@ #include "funccall_t.h" #include "irhooks.h" #include "iredges_t.h" +#include "irmemory_t.h" #include "tropt.h" #include "debugger.h" #include "be_t.h" @@ -148,6 +149,8 @@ void init_firm(const firm_parameter_t *param) init_type_identify(def_params.ti_if); /* class cast optimization */ firm_init_class_casts_opt(); + /* memory disambiguation */ + firm_init_memory_disambiguator(); /* Init architecture dependent optimizations. */ arch_dep_init(arch_dep_default_factory); -- 2.20.1