cleanup: Remove duplicate MIN/MAX macros.
[libfirm] / ir / lower / lower_hl.c
index 136555f..cd27321 100644 (file)
@@ -1,20 +1,6 @@
 /*
- * Copyright (C) 1995-2008 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.
  */
 
 /**
@@ -34,7 +20,6 @@
 #include "irhooks.h"
 #include "irgmod.h"
 #include "irgwalk.h"
-#include "irtools.h"
 #include "irpass_t.h"
 
 /**
@@ -111,7 +96,6 @@ static void lower_sel(ir_node *sel)
                                lb = get_array_lower_bound(arr_ty, dim);
                                ub = get_array_upper_bound(arr_ty, dim);
 
-                               assert(irg == current_ir_graph);
                                if (! is_Unknown(lb))
                                        lb = new_rd_Conv(dbg, bl, copy_const_value(get_irn_dbg_info(sel), lb, bl), mode_Int);
                                else
@@ -270,20 +254,6 @@ static void lower_symconst(ir_node *symc)
        }
 }
 
-/**
- * Checks, whether a size is an integral size
- *
- * @param size  the size on bits
- */
-static int is_integral_size(int size)
-{
-       /* must be a 2^n */
-       if (size & (size-1))
-               return 0;
-       /* must be at least byte size */
-       return size >= 8;
-}
-
 /**
  * lowers IR-nodes, called from walker
  */
@@ -297,9 +267,6 @@ static void lower_irnode(ir_node *irn, void *env)
        case iro_SymConst:
                lower_symconst(irn);
                break;
-       case iro_Cast:
-               exchange(irn, get_Cast_op(irn));
-               break;
        default:
                break;
        }
@@ -312,7 +279,7 @@ static void lower_irnode(ir_node *irn, void *env)
  */
 void lower_highlevel_graph(ir_graph *irg)
 {
-       /* Finally: lower SymConst-Size and Sel nodes, Casts, unaligned Load/Stores. */
+       /* Finally: lower SymConst-Size and Sel nodes, unaligned Load/Stores. */
        irg_walk_graph(irg, NULL, lower_irnode, NULL);
 }