From: Götz Lindenmaier Date: Sun, 22 May 2005 15:17:35 +0000 (+0000) Subject: bugfix and additional case for optimization. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=adf42c90252cbcea388dd45d5f840a5459d9446d;p=libfirm bugfix and additional case for optimization. May we skip casts when checking for exception after alloc? I think so. [r5868] --- diff --git a/ir/opt/ldstopt.c b/ir/opt/ldstopt.c index 663ff5fd3..5bf3c9442 100644 --- a/ir/opt/ldstopt.c +++ b/ir/opt/ldstopt.c @@ -381,7 +381,8 @@ static int optimize_load(ir_node *load) } } } - else if (get_irn_op(ptr) == op_Alloc) { + else if ((get_irn_op(skip_Proj(ptr)) == op_Alloc) || + ((get_irn_op(ptr) == op_Cast) && (get_irn_op(skip_Proj(get_Cast_op(ptr))) == op_Alloc))) { /* simple case: a direct load after an Alloc. Firm Alloc throw * an exception in case of out-of-memory. So, there is no way for an * exception in this load.