X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firopt.h;h=9203ef8e05139456fa981fe9a0e3a245bb0e5f5b;hb=45fc5c69b556a288c3df6058b58ad99b2d865ac5;hp=cb2fb16144b889b01f90f2310bb0136e33c7c1e5;hpb=737e5ba7fa2ce36fd096b36e9e73b5053eec1114;p=libfirm diff --git a/include/libfirm/iropt.h b/include/libfirm/iropt.h index cb2fb1614..9203ef8e0 100644 --- a/include/libfirm/iropt.h +++ b/include/libfirm/iropt.h @@ -51,20 +51,24 @@ * - 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. Usefull for frontends which do not + * create arithmetic operations in the backends arithmetic mode. */ typedef enum _fp_model_t { - fp_explicit_rounding = 1, /**< Explicit rounding at assignments, typecasts, return + 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. */ - fp_strict_algebraic = 2, /**< Strict adherence to non-associative and non-distributive + fp_strict_algebraic = (1u << 1), /**< Strict adherence to non-associative and non-distributive algebra unless the same result is guaranteed. */ - fp_contradictions = 4, /**< FP contradictions are enabled. Only for backend. */ - fp_strict_eval_order = 8, /**< FP instructions must be strict evaluated in given order. */ - fp_exceptions = 16, /**< FP exceptions are supported. No reordering that changes + fp_contradictions = (1u << 2), /**< FP contradictions are enabled. Only for backend. */ + fp_strict_eval_order = (1u << 3), /**< FP instructions must be strict evaluated in given order. */ + fp_exceptions = (1u << 4), /**< FP exceptions are supported. No reordering that changes the exception flow are allowed. Backends must generate synchronized exception code. */ - fp_environment_access = 32, /**< FPU environment can be accessed. Even Constant folding + 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, @@ -78,7 +82,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. */ -tarval *computed_value(ir_node *n); +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.