ident_if_t *id_if;
/**
- * The default calling convention.
+ * dummy parameter
+ * (this used to hold a default calling convention, but this concept is no
+ * more. You should always set the calling convention manually after
+ * creating the method entity if you need something else)
*/
unsigned cc_mask;
/**
* initialize the statistics module.
+ * Should be called directly after ir_init
*
* @param enable_options a bitmask containing the statistic options
*/
* e.g., that no more subtypes will be added. */
FIRM_API void irp_finalize_cons(void);
+FIRM_API void ir_set_uninitialized_local_variable_func(
+ uninitialized_local_variable_func_t *func);
+
#include "end.h"
#endif
/** fastcall calling convention */
#define cc_fastcall_set (cc_reg_param|cc_callee_clear_stk)
-/** Returns the default calling convention for method types. */
-FIRM_API unsigned get_default_cc_mask(void);
-
/**
* check for the CDECL calling convention
*/
/* initialize all op codes an irnode can consist of */
init_op();
/* called once for each run of this library */
- firm_init_cons(def_params.initialize_local_func);
+ ir_set_uninitialized_local_variable_func(def_params.initialize_local_func);
/* initialize reassociation */
firm_init_reassociation();
/* initialize function call optimization */
later. */
init_irprog_2();
/* Initialize the type module and construct some idents needed. */
- firm_init_type(def_params.cc_mask);
+ firm_init_type();
/* initialize the entity module */
firm_init_entity();
/* class cast optimization */
/* initialize */
/* call once for each run of the library */
-void firm_init_cons(uninitialized_local_variable_func_t *func)
+void ir_set_uninitialized_local_variable_func(
+ uninitialized_local_variable_func_t *func)
{
default_initialize_local_variable = func;
-} /* firm_init_cons */
+}
void irp_finalize_cons(void)
{
#include "ircons.h"
#include "irgraph_t.h"
-/**
- * Initializes the graph construction.
- *
- * @param func callback that is called if a uninitialized
- * variable is detected
- *
- * @see uninitialized_local_variable_func_t
- */
-void firm_init_cons(uninitialized_local_variable_func_t *func);
-
/**
* Creates a new Anchor node.
*/
static ident *value_params_suffix = NULL;
static ident *value_ress_suffix = NULL;
-/** The default calling convention for method types. */
-static unsigned default_cc_mask;
-
-unsigned get_default_cc_mask(void)
-{
- return default_cc_mask;
-}
-
-void firm_init_type(unsigned def_cc_mask)
+void firm_init_type(void)
{
- default_cc_mask = def_cc_mask;
value_params_suffix = new_id_from_str(VALUE_PARAMS_SUFFIX);
value_ress_suffix = new_id_from_str(VALUE_RESS_SUFFIX);
res->attr.ma.variadicity = variadicity_non_variadic;
res->attr.ma.first_variadic_param = -1;
res->attr.ma.additional_properties = mtp_no_property;
- res->attr.ma.irg_calling_conv = default_cc_mask;
hook_new_type(res);
return res;
}
/**
* Initialize the type module.
- *
- * @param default_cc_mask default calling conventions for methods
*/
-void firm_init_type(unsigned default_cc_mask);
+void firm_init_type(void);
/** Clone an existing method type.
*