Bugfix: restructured so memory disambiguator can switched off
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sat, 20 Sep 2008 12:01:32 +0000 (12:01 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sat, 20 Sep 2008 12:01:32 +0000 (12:01 +0000)
[r22136]

ir/ana/irmemory.c
ir/ana/irmemory_t.h [new file with mode: 0644]
ir/common/firm.c

index 00da7d9..313b54a 100644 (file)
@@ -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 <adt/pmap.h>
 #include "typerep.h"
diff --git a/ir/ana/irmemory_t.h b/ir/ana/irmemory_t.h
new file mode 100644 (file)
index 0000000..3191301
--- /dev/null
@@ -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
index 97edf99..d1ce4d6 100644 (file)
@@ -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);