3 * File name: ir/lower/lower_calls.h
4 * Purpose: lowering of Calls with compound parameters
8 * Copyright: (c) 1998-2005 Universität Karlsruhe
9 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
15 * Lowering of Calls with compound return types.
17 * @author Michael Beck
19 #ifndef _LOWER_CALLS_H_
20 #define _LOWER_CALLS_H_
23 * A type telling where to add hidden parameters.
25 typedef enum add_hidden_params {
26 ADD_HIDDEN_ALWAYS_IN_FRONT = 0, /**< always add hidden parameters in front (default). */
27 ADD_HIDDEN_ALWAYS_LAST = 1, /**< always add hidden parameters last, did not work for variadic functions. */
28 ADD_HIDDEN_SMART = 2, /**< add hidden parameters last for non-variadic and first for variadic functions. */
32 int def_ptr_alignment; /**< default alignment for data pointer */
33 add_hidden hidden_params; /**< where to add hidden params. */
35 /** a function returning a pointer type for a given type */
36 ir_type *(*find_pointer_type)(ir_type *e_type, ir_mode *mode, int alignment);
40 * Lower calls with compound return types.
41 * This function does the following transformations:
43 * - Adds a new (hidden) pointer parameter for
44 * any return compound type.
46 * - Use of the hidden parameters in the function code.
48 * - Change all calls to functions with compound return
49 * by providing space for the hidden parameter on the callers
52 * - Replace a possible block copy after the function call.
54 void lower_compound_ret_calls(const lower_params_t *params);
56 #endif /* _LOWER_CALLS_H_ */