summaryrefslogtreecommitdiffhomepage
path: root/ir/ana
diff options
context:
space:
mode:
authorRaphael von der GrĂ¼n <raphinesse@gmail.com>2016-05-17 17:40:48 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-06-14 10:42:03 +0200
commit9260589a1178c566929fb69abe8c7c87b047a540 (patch)
treedf512ed7406c49ed11f55e00bfbc46647782218e /ir/ana
parent0ac749142a7ae558e64b2121a24484b31a74dc7d (diff)
Remove duplicated code block
Diffstat (limited to 'ir/ana')
-rw-r--r--ir/ana/analyze_irg_args.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/ir/ana/analyze_irg_args.c b/ir/ana/analyze_irg_args.c
index 4a966c2..5c5da5c 100644
--- a/ir/ana/analyze_irg_args.c
+++ b/ir/ana/analyze_irg_args.c
@@ -378,14 +378,8 @@ static void analyze_method_params_weight(ir_entity *ent)
unsigned get_method_param_weight(ir_entity *ent, size_t pos)
{
- 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];
- else
- return null_weight;
- }
-
- analyze_method_params_weight(ent);
+ if (!ent->attr.mtd_attr.param_weight)
+ analyze_method_params_weight(ent);
if (pos < ARR_LEN(ent->attr.mtd_attr.param_weight))
return ent->attr.mtd_attr.param_weight[pos];