X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fanalyze_irg_args.c;h=79a2e09aef5187dd142db2640f79608a664e9272;hb=f6aeac6a547a52beb3cb663c5e63c05c9c3728ea;hp=51a7158d18137c27a885251960be12fcb2fbfa46;hpb=c894a217e4fa6b97252aad8c311002be664742a2;p=libfirm diff --git a/ir/ana/analyze_irg_args.c b/ir/ana/analyze_irg_args.c index 51a7158d1..79a2e09ae 100644 --- a/ir/ana/analyze_irg_args.c +++ b/ir/ana/analyze_irg_args.c @@ -34,10 +34,9 @@ #include "irouts.h" #include "irnode_t.h" #include "irmode_t.h" -#include "array.h" +#include "array_t.h" #include "irprog.h" #include "entity_t.h" -#include "xmalloc.h" #include "analyze_irg_args.h" @@ -474,15 +473,15 @@ static void analyze_method_params_weight(ir_entity *ent) { * higher optimization with procedure cloning. * * The values are calculation on demand only. + * + * @param ent the entity to analyze + * @param pos the argument number + * + * @return the parameter weight or null_weight if pos is greater + * than the number of arguments. */ unsigned get_method_param_weight(ir_entity *ent, int pos) { -#ifndef NDEBUG - ir_type *mtp = get_entity_type(ent); - int is_variadic = get_method_variadicity(mtp) == variadicity_variadic; - assert(0 <= pos && (is_variadic || pos < get_method_n_params(mtp))); -#endif - if (ent->attr.mtd_attr.param_weight) { if (pos < ARR_LEN(ent->attr.mtd_attr.param_weight)) return ent->attr.mtd_attr.param_weight[pos];