Fixed initialization of option tables
[libfirm] / ir / opt / opt_frame.c
index 1680f5f..5ea1c45 100644 (file)
@@ -1,29 +1,40 @@
 /*
- * Project:     libFIRM
- * File name:   ir/opt/opt_frame.c
- * Purpose:     optimize the frame type
- * Author:      Michael Beck
- * Created:     15.03.2006
- * CVS-ID:      $Id$
- * Copyright:   (c) 1998-2006 Universität Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 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 opt_frame.c
- *
- * Optimize the frame type by removing unused type members.
+ * @file
+ * @brief   Optimize the frame type.
+ * @date    15.03.2006
+ * @author  Michael Beck
+ * @version $Id$
+ * @summary
+ *   Optimize the frame type by removing unused type members.
  */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "iroptimize.h"
 #include "irgraph_t.h"
 #include "type_t.h"
 #include "irouts.h"
 #include "iredges.h"
-#include "opt_frame.h"
 
 /*
  * Optimize the frame type of an irg by removing
@@ -31,7 +42,7 @@
  */
 void opt_frame_irg(ir_graph *irg) {
   ir_type   *frame_tp = get_irg_frame_type(irg);
-  entity    *ent, *list;
+  ir_entity *ent, *list;
   ir_node   *frame, *sel;
   int       i, n = get_class_n_members(frame_tp);
 
@@ -48,9 +59,8 @@ void opt_frame_irg(ir_graph *irg) {
   /* look for uses */
   frame = get_irg_frame(irg);
 
-#ifdef FIRM_EDGES_INPLACE
   if (edges_activated(irg)) { /* use inplace edges */
-    ir_edge_t *edge;
+    const ir_edge_t *edge;
 
     /* mark all used entities */
     foreach_out_edge(frame, edge) {
@@ -59,9 +69,7 @@ void opt_frame_irg(ir_graph *irg) {
       set_entity_link(ent, ent);
     }
   }
-  else
-#endif /* FIRM_EDGES_INPLACE */
-  {
+  else {
     /* use traditionally out edges */
     if (get_irg_outs_state(irg) != outs_consistent)
       compute_irg_outs(irg);