strictconv is not necessary anymore in latest firm
authorMatthias Braun <matthias.braun@kit.edu>
Tue, 21 Aug 2012 14:50:37 +0000 (16:50 +0200)
committerMatthias Braun <matthias.braun@kit.edu>
Tue, 21 Aug 2012 14:51:47 +0000 (16:51 +0200)
ast2firm.c
libfirm

index c929e64..e079ab0 100644 (file)
@@ -1419,32 +1419,6 @@ static ir_node *deref_address(dbg_info *const dbgi, type_t *const type,
        return create_conv(dbgi, load_res, mode_arithmetic);
 }
 
-/**
- * Creates a strict Conv (to the node's mode) if necessary.
- *
- * @param dbgi  debug info
- * @param node  the node to strict conv
- */
-static ir_node *do_strict_conv(dbg_info *dbgi, ir_node *node)
-{
-       ir_mode *mode = get_irn_mode(node);
-
-       if (!(get_irg_fp_model(current_ir_graph) & fp_explicit_rounding))
-               return node;
-       if (!mode_is_float(mode))
-               return node;
-
-       /* check if there is already a Conv */
-       if (is_Conv(node)) {
-               /* convert it into a strict Conv */
-               set_Conv_strict(node, 1);
-               return node;
-       }
-
-       /* otherwise create a new one */
-       return new_d_strictConv(dbgi, node, mode);
-}
-
 /**
  * Returns the correct base address depending on whether it is a parameter or a
  * normal local variable.
@@ -1758,7 +1732,6 @@ static ir_node *call_expression_to_firm(const call_expression_t *const call)
                if (!is_type_compound(arg_type)) {
                        ir_mode *const mode = get_ir_mode_storage(arg_type);
                        arg_node = create_conv(dbgi, arg_node, mode);
-                       arg_node = do_strict_conv(dbgi, arg_node);
                }
 
                in[n] = arg_node;
@@ -1833,7 +1806,6 @@ static void assign_value(dbg_info *dbgi, ir_node *addr, type_t *type,
        if (!is_type_compound(type)) {
                ir_mode *mode = get_ir_mode_storage(type);
                value         = create_conv(dbgi, value, mode);
-               value         = do_strict_conv(dbgi, value);
        }
 
        ir_node *memory = get_store();
@@ -1998,7 +1970,6 @@ static ir_node *set_value_for_expression_addr(const expression_t *expression,
        if (!is_type_compound(type)) {
                ir_mode  *mode = get_ir_mode_storage(type);
                value          = create_conv(dbgi, value, mode);
-               value          = do_strict_conv(dbgi, value);
        }
 
        if (expression->kind == EXPR_REFERENCE) {
@@ -2289,7 +2260,6 @@ static ir_node *create_cast(dbg_info *dbgi, ir_node *value_node,
 
        ir_mode *mode_arith = get_ir_mode_arithmetic(type);
        ir_node *node       = create_conv(dbgi, value_node, mode);
-       node                = do_strict_conv(dbgi, node);
        node                = create_conv(dbgi, node, mode_arith);
 
        return node;
@@ -2554,7 +2524,6 @@ static ir_node *create_assign_binop(const binary_expression_t *expression)
        ir_node            *result    = create_op(dbgi, expression, left, right);
 
        result = create_cast(dbgi, result, expression->right->base.type, type);
-       result = do_strict_conv(dbgi, result);
 
        result = set_value_for_expression_addr(left_expr, result, left_addr);
 
@@ -4120,7 +4089,6 @@ static void create_variable_initializer(entity_t *entity)
                dbg_info *const dbgi = get_dbg_info(&entity->base.source_position);
                ir_mode  *const mode = get_ir_mode_storage(init_type);
                node = create_conv(dbgi, node, mode);
-               node = do_strict_conv(dbgi, node);
 
                if (declaration_kind == DECLARATION_KIND_LOCAL_VARIABLE) {
                        set_value(entity->variable.v.value_number, node);
@@ -4279,7 +4247,6 @@ static ir_node *return_statement_to_firm(return_statement_t *statement)
                ir_mode *const mode = get_ir_mode_storage(type);
                if (res) {
                        res = create_conv(dbgi, res, mode);
-                       res = do_strict_conv(dbgi, res);
                } else {
                        res = new_Unknown(mode);
                }
@@ -5253,7 +5220,6 @@ static void initialize_function_parameters(entity_t *entity)
 
                ir_mode *mode = get_ir_mode_storage(type);
                value = create_conv(NULL, value, mode);
-               value = do_strict_conv(NULL, value);
 
                parameter->declaration.kind        = DECLARATION_KIND_PARAMETER;
                parameter->variable.v.value_number = next_value_number_function;
diff --git a/libfirm b/libfirm
index a993bec..31b3daf 160000 (submodule)
--- a/libfirm
+++ b/libfirm
@@ -1 +1 @@
-Subproject commit a993becfccbd6214d092e181a4ee07c19f132185
+Subproject commit 31b3daf7df17cca0abdee1294ac1f6f6304e9d22