grrrr bugfix
[libfirm] / ir / ir / irflag.h
index dd8f5ed..f0dc979 100644 (file)
@@ -1,12 +1,22 @@
-/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-* All rights reserved.
-*
-* Authors: Christian Schaefer
-*
-* irflag --- optimization flags
-*/
+/*
+ * Project:     libFIRM
+ * File name:   ir/ir/irflag.h
+ * Purpose:     Flags to control optimizations.
+ * Author:      Christian Schaefer, Goetz Lindenmaier
+ * Modified by:
+ * Created:
+ * CVS-ID:      $Id$
+ * Copyright:   (c) 1999-2003 Universität Karlsruhe
+ * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ */
 
-/* $Id$ */
+/**
+ * @file irflag.h
+ *
+ * Optimization flags.
+ *
+ * @author Christian Schaefer
+ */
 
 #ifndef _IRFLAG_H_
 #define _IRFLAG_H_
@@ -50,7 +60,8 @@ int  get_opt_cse (void);
  * constant subexpression elimination for floating nodes.  Intra
  * procedure cse gets the graph into state "floating".  It is necessary
  * to run pre/code motion to get the graph back into state "pinned".
- * Default: opt_global_cse == 1.
+ * right after a call to local_optimize with global cse turned on.
+ * Default: opt_global_cse == 0.
  */
 void set_opt_global_cse (int value);
 /** Returns global constant subexpression elimination setting. */
@@ -70,7 +81,7 @@ int  get_opt_unreachable_code(void);
  *
  * Performs Straightening, if simplifications and loop simplifications.
  * Sets all separate control flow flags (control_flow_straightening,
- * weak_simplification and strong_simplification).
+ * weak_simplification, strong_simplification and critical_edges).
  */
 void set_opt_control_flow(int value);
 
@@ -89,6 +100,11 @@ void set_opt_control_flow_strong_simplification(int value);
 /** Returns strong if and loop simplification setting */
 int  get_opt_control_flow_strong_simplification(void);
 
+/** Enables/Disables removal of critical control flow edges. */
+void set_opt_critical_edges(int value);
+/** Returns whether critical edges are removed */
+int  get_opt_critical_edges(void);
+
 /** Enables/Disables reassociation.
  *
  * If opt_reassociation == 1 reassociation is performed.
@@ -115,4 +131,29 @@ void set_opt_inline (int value);
 /** Returns inlining setting. */
 int  get_opt_inline (void);
 
+/** Enable/Disable optimization of dynamic method dispatch
+ *
+ * This flag enables/disables the optimization of dynamic method dispatch.
+ * If the flag is turned on Sel nodes can be replaced by Const nodes representing
+ * the address of a function.
+ */
+void set_opt_dyn_meth_dispatch (int value);
+int  get_opt_dyn_meth_dispatch (void);
+
+/** Enable/Disable normalizations of the firm representation.
+ *
+ *  This flag guards transformations that normalize the firm representation
+ *  as removing Ids and Tuples, useless Phis, replacing SymConst(id) by
+ *  Const(entity) and others.
+ *  The transformations guarded by this flag are not guarded by flag
+ *  "optimize".
+ *  Many algorithms operating on firm can not deal with constructs in
+ *  the non-normalized representation.
+ *  default: 1
+ *  @@@ ATTENTION: not all such transformations are guarded by a flag.
+ */
+void set_opt_normalize (int value);
+int  get_opt_normalize (void);
+
+
 #endif