bechordal_draw: Remove the write-only attribute max_color from struct draw_chordal_env_t.
[libfirm] / ir / lower / lower_softfloat.c
index e967f56..f7bdeec 100644 (file)
@@ -1,20 +1,6 @@
 /*
- * Copyright (C) 1995-2011 University of Karlsruhe.  All right reserved.
- *
  * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
@@ -141,7 +127,6 @@ static ir_type *get_softfloat_type(const ir_node *n)
 
        switch (opcode) {
        case iro_Div:
-               mode         = get_Div_resmode(n);
                operand_mode = get_irn_mode(get_Div_left(n));
                /* fall through */
        case iro_Add:
@@ -601,23 +586,19 @@ static const tarval_mode_info hex_output = {
  */
 static void lower_Const(ir_node *n)
 {
-       ir_mode   *lowered_mode;
-       ir_mode   *mode         = get_irn_mode(n);
-       ir_tarval *tv = get_Const_tarval(n);
-       char       buf[100];
-       size_t     len;
-
-       if (! mode_is_float(mode))
+       ir_mode *mode = get_irn_mode(n);
+       if (!mode_is_float(mode))
                return;
 
-       lowered_mode = get_lowered_mode(mode);
+       ir_mode *lowered_mode = get_lowered_mode(mode);
        set_irn_mode(n, lowered_mode);
 
        set_tarval_mode_output_option(mode, &hex_output);
-       tarval_snprintf(buf, 100, get_Const_tarval(n));
+       char buf[100];
+       tarval_snprintf(buf, sizeof(buf), get_Const_tarval(n));
 
-       len = strlen(buf);
-       tv  = new_tarval_from_str(buf, len, lowered_mode);
+       size_t     len = strlen(buf);
+       ir_tarval *tv  = new_tarval_from_str(buf, len, lowered_mode);
        set_Const_tarval(n, tv);
 }
 
@@ -694,16 +675,14 @@ static void lower_Conv(ir_node *n)
  */
 static void lower_Div(ir_node *n)
 {
-       ir_node         *symconst;
-       ir_node         *block       = get_nodes_block(n);
-       ir_node         *call_result = NULL;
-       dbg_info        *dbgi        = get_irn_dbg_info(n);
-       ir_graph        *irg         = get_irn_irg(n);
-       ir_node         *left        = get_Div_left(n);
-       ir_mode         *mode        = get_Div_resmode(n);
-       ir_node         *right       = get_Div_right(n);
-       const ir_edge_t *edge;
-       const ir_edge_t *next;
+       ir_node  *symconst;
+       ir_node  *block       = get_nodes_block(n);
+       ir_node  *call_result = NULL;
+       dbg_info *dbgi        = get_irn_dbg_info(n);
+       ir_graph *irg         = get_irn_irg(n);
+       ir_node  *left        = get_Div_left(n);
+       ir_mode  *mode        = get_Div_resmode(n);
+       ir_node  *right       = get_Div_right(n);
 
        if (! mode_is_float(mode))
                return;
@@ -723,7 +702,7 @@ static void lower_Div(ir_node *n)
 
        set_irn_pinned(call, get_irn_pinned(n));
 
-       foreach_out_edge_safe(n, edge, next) {
+       foreach_out_edge_safe(n, edge) {
                ir_node *proj = get_edge_src_irn(edge);
                if (! is_Proj(proj))
                        continue;