X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firflag.h;h=f0dc9790202951a7e0f20d02199d2971f9c46340;hb=7599c9b252632e5766dc10857d91eb8862538bf5;hp=30efef38c4c3e3dbcdc6472f1f8bf602b7654e97;hpb=e5cd86a62c635739fdd58c394d7069b1655ced79;p=libfirm diff --git a/ir/ir/irflag.h b/ir/ir/irflag.h index 30efef38c..f0dc97902 100644 --- a/ir/ir/irflag.h +++ b/ir/ir/irflag.h @@ -1,6 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -*/ +/* + * 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. + */ /** * @file irflag.h @@ -10,8 +18,6 @@ * @author Christian Schaefer */ -/* $Id$ */ - #ifndef _IRFLAG_H_ #define _IRFLAG_H_ @@ -54,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. */ @@ -74,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); @@ -93,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. @@ -119,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