X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firopt.h;h=a211cdaee95004313003e1c5efda851aaf82e4a2;hb=9a1c04e0bdc66d8fce339bc81408728b9459d033;hp=24dec126d34aacc7fb48142c1fba61ab30e9a01a;hpb=74d5a9023b48f346eead323a74e28297659e34b7;p=libfirm diff --git a/include/libfirm/iropt.h b/include/libfirm/iropt.h index 24dec126d..a211cdaee 100644 --- a/include/libfirm/iropt.h +++ b/include/libfirm/iropt.h @@ -21,7 +21,6 @@ * @file * @brief iropt --- optimizations of an ir node. * @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck - * @version $Id$ */ #ifndef FIRM_IR_IROPT_H #define FIRM_IR_IROPT_H @@ -29,6 +28,12 @@ #include "firm_types.h" #include "begin.h" +/** + * @ingroup iroptimize + * @defgroup iropt Local Optimizations + * @{ + */ + /** * The Floating point model. * @@ -52,11 +57,8 @@ * - fp_model_fast: * Fastest mode. Associative and distributive law allowed at the expense * of floating point accuracy and correctness. Explicit rounding is disabled. - * - fp_no_float_fold: - * Avoid floating point constant folding. Useful for frontends which do not - * create arithmetic operations in the backends arithmetic mode. */ -typedef enum _fp_model_t { +typedef enum fp_model_t { fp_explicit_rounding = (1u << 0), /**< Explicit rounding at assignments, typecasts, return and function calls. Conv nodes may NOT be removed, even if they look useless. */ @@ -69,7 +71,6 @@ typedef enum _fp_model_t { synchronized exception code. */ fp_environment_access = (1u << 5), /**< FPU environment can be accessed. Even Constant folding cannot be done. */ - fp_no_float_fold = (1u << 6), /** Precise floating point model. Default. */ fp_model_precise = fp_explicit_rounding|fp_strict_algebraic|fp_contradictions, @@ -83,7 +84,7 @@ typedef enum _fp_model_t { /** If the expression referenced can be evaluated statically * computed_value returns a tarval representing the result. * Else returns tarval_bad. */ -FIRM_API tarval *computed_value(const ir_node *n); +FIRM_API ir_tarval *computed_value(const ir_node *n); /** Applies all optimizations to n that are expressible as a pattern * in Firm, i.e., they need not a walk of the graph. @@ -95,6 +96,20 @@ FIRM_API tarval *computed_value(const ir_node *n); */ FIRM_API ir_node *optimize_in_place(ir_node *n); +/** + * checks whether 1 value is the negated other value + */ +FIRM_API int ir_is_negated_value(const ir_node *a, const ir_node *b); + +/** + * (conservatively) approximates all possible relations when comparing + * the value @p left and @p right + */ +FIRM_API ir_relation ir_get_possible_cmp_relations(const ir_node *left, + const ir_node *right); + +/** @} */ + #include "end.h" #endif