X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fopt_confirms.h;h=2afbe7c894b8912994276f4d8f54020e525d6651;hb=1a4bb21b7aa32f0bcd282d4c1cdb144aca601fa9;hp=e353d32cff8e2f504fc086e7dc553a1820f97493;hpb=0d470055af1b3bc6c917e6f004123e5aab47de8f;p=libfirm diff --git a/ir/opt/opt_confirms.h b/ir/opt/opt_confirms.h index e353d32cf..2afbe7c89 100644 --- a/ir/opt/opt_confirms.h +++ b/ir/opt/opt_confirms.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -22,19 +22,18 @@ * @brief Optimizations regarding Confirm nodes. * @author Michael Beck * @version $Id$ + * + * Optimizations regarding Confirm nodes. + * These optimizations are not means to be run from + * frontends, they are called from iropt. */ #ifndef FIRM_OPT_CONFIRMS_H #define FIRM_OPT_CONFIRMS_H #include "firm_types.h" -/**a - * @file opt_confirms.h - * - * Optimizations regarding Confirm nodes. - * These optimizations are not means to be run from - * frontends, they are called from iropt. - */ +/** Needed for MSVC to suporess warnings because it doest NOT handle const right. */ +typedef const ir_node *ir_node_cnst_ptr; /** * Check, if the value of a node is != 0. @@ -46,12 +45,12 @@ * @param confirm if n is confirmed to be != 0, returns * the the Confirm-node, else NULL */ -int value_not_zero(ir_node *n, ir_node **confirm); +int value_not_zero(const ir_node *n, ir_node_cnst_ptr *confirm); /** * Check, if the value of a node cannot represent a NULL pointer. * - * - If sel_based_null_check_elim is enabled, all + * - If option sel_based_null_check_elim is enabled, all * Sel nodes can be skipped. * - A SymConst(entity) is NEVER a NULL pointer * - A Const != NULL is NEVER a NULL pointer @@ -61,16 +60,16 @@ int value_not_zero(ir_node *n, ir_node **confirm); * @param confirm if n is confirmed to be != NULL, returns * the the Confirm-node, else NULL */ -int value_not_null(ir_node *n, ir_node **confirm); +int value_not_null(const ir_node *n, ir_node_cnst_ptr *confirm); /** * Possible return values of value_classify(). */ typedef enum _value_classify_sign { - value_classified_unknown = 0, /**< could not classify */ - value_classified_positive = 1, /**< value is positive, i.e. >= 0 */ - value_classified_negative = -1 /**< value is negative, i.e. <= 0 if - no signed zero exists or < 0 else */ + value_classified_unknown = 0, /**< could not classify */ + value_classified_positive = 1, /**< value is positive, i.e. >= 0 */ + value_classified_negative = -1 /**< value is negative, i.e. <= 0 if + no signed zero exists or < 0 else */ } value_classify_sign; /**