Introduce flip-flopping normalisations
[libfirm] / include / libfirm / lowering.h
index 4aa0fe3..149a6c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2011 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -26,6 +26,8 @@
 #ifndef FIRM_LOWERING_H
 #define FIRM_LOWERING_H
 
+#include <stddef.h>
+
 #include "firm_types.h"
 
 #include "begin.h"
@@ -167,44 +169,6 @@ FIRM_API void lower_CopyB(ir_graph *irg, unsigned max_size,
 FIRM_API void lower_switch(ir_graph *irg, unsigned spare_size,
                            int allow_out_of_bounds);
 
-/**
- * A callback type for creating an intrinsic entity for a given opcode.
- *
- * @param method   the method type of the emulation function entity
- * @param op       the emulated ir_op
- * @param imode    the input mode of the emulated opcode
- * @param omode    the output mode of the emulated opcode
- * @param context  the context parameter
- */
-typedef ir_entity *(create_intrinsic_fkt)(ir_type *method, const ir_op *op,
-                                          const ir_mode *imode,
-                                          const ir_mode *omode, void *context);
-
-/**
- * The lowering parameter description.
- */
-typedef struct lwrdw_param_t {
-       unsigned              little_endian : 1; /**< if true should be lowered for little endian, else big endian */
-       unsigned              doubleword_size;   /**< bitsize of the doubleword mode */
-       create_intrinsic_fkt *create_intrinsic;  /**< callback that creates the intrinsic entity */
-       void                 *ctx;               /**< context parameter for the creator function */
-} lwrdw_param_t;
-
-/**
- * Lower all double word operations.
- *
- * @param param  parameter for lowering
- */
-FIRM_API void lower_dw_ops(const lwrdw_param_t *param);
-
-/**
- * Default implementation. Context is unused.
- */
-FIRM_API ir_entity *def_create_intrinsic_fkt(ir_type *method, const ir_op *op,
-                                             const ir_mode *imode,
-                                             const ir_mode *omode,
-                                             void *context);
-
 /**
  * Replaces SymConsts by a real constant if possible.
  * Replace Sel nodes by address computation.  Also resolves array access.
@@ -389,7 +353,7 @@ typedef union i_record {
  *
  * @return number of found intrinsics.
  */
-FIRM_API unsigned lower_intrinsics(i_record *list, int length,
+FIRM_API size_t lower_intrinsics(i_record *list, size_t length,
                                    int part_block_used);
 
 /**
@@ -401,7 +365,7 @@ FIRM_API unsigned lower_intrinsics(i_record *list, int length,
  * @param part_block_used  set to true if part_block() must be using during lowering
  */
 FIRM_API ir_prog_pass_t *lower_intrinsics_pass(const char *name, i_record *list,
-                                               int length, int part_block_used);
+                                               size_t length, int part_block_used);
 
 /**
  * A mapper for the integer/float absolute value: type abs(type v).