__attribute__((pure)) specifier. */
set_entity_additional_property(ent, mtp_property_pure);
}
+ if (decl->modifiers & DM_CONST) {
+ set_entity_additional_property(ent, mtp_property_const);
+ }
if (decl->modifiers & DM_USED) {
/* TRUE if the declaration includes the GNU
__attribute__((used)) specifier. */
DM_NOALIAS = 1 << 12,
DM_PACKED = 1 << 13,
DM_TRANSPARENT_UNION = 1 << 14,
- DM_PURE = 1 << 15,
- DM_CONSTRUCTOR = 1 << 16,
- DM_DESTRUCTOR = 1 << 17,
- DM_UNUSED = 1 << 18,
- DM_USED = 1 << 19,
- DM_CDECL = 1 << 20,
- DM_FASTCALL = 1 << 21,
- DM_STDCALL = 1 << 22,
- DM_THISCALL = 1 << 23,
- DM_DEPRECATED = 1 << 24
+ DM_CONST = 1 << 15,
+ DM_PURE = 1 << 16,
+ DM_CONSTRUCTOR = 1 << 17,
+ DM_DESTRUCTOR = 1 << 18,
+ DM_UNUSED = 1 << 19,
+ DM_USED = 1 << 20,
+ DM_CDECL = 1 << 21,
+ DM_FASTCALL = 1 << 22,
+ DM_STDCALL = 1 << 23,
+ DM_THISCALL = 1 << 24,
+ DM_DEPRECATED = 1 << 25
} decl_modifier_t;
typedef unsigned decl_modifiers_t;
static void do_optimize_funccalls(void)
{
- optimize_funccalls(firm_const_exists, NULL);
+ optimize_funccalls(true, NULL);
}
static void do_gcse(ir_graph *irg)
static void do_inline(void)
{
- inline_functions(500, 50);
+ inline_functions(500, 0);
}
static void do_cloning(void)
}
switch(kind) {
- case GNU_AK_CONST:
case GNU_AK_VOLATILE:
case GNU_AK_NAKED:
case GNU_AK_MALLOC:
case GNU_AK_UNUSED: modifiers |= DM_UNUSED; goto no_arg;
case GNU_AK_USED: modifiers |= DM_USED; goto no_arg;
case GNU_AK_PURE: modifiers |= DM_PURE; goto no_arg;
+ case GNU_AK_CONST: modifiers |= DM_CONST; goto no_arg;
case GNU_AK_ALWAYS_INLINE: modifiers |= DM_FORCEINLINE; goto no_arg;
case GNU_AK_DLLIMPORT: modifiers |= DM_DLLIMPORT; goto no_arg;
case GNU_AK_DLLEXPORT: modifiers |= DM_DLLEXPORT; goto no_arg;