From: Michael Beck Date: Mon, 20 Oct 2008 14:16:43 +0000 (+0000) Subject: - BugFix: we need an extra compute_Return(), else compute_default() X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=7f448625b171f4f87057c54a1314b54bc6e7953e;p=libfirm - BugFix: we need an extra compute_Return(), else compute_default() kills Return(Top) nodes ... [r23035] --- diff --git a/ir/opt/combo.c b/ir/opt/combo.c index 48f14cf54..ef24143e2 100644 --- a/ir/opt/combo.c +++ b/ir/opt/combo.c @@ -1872,6 +1872,18 @@ static void compute_Jmp(node_t *node) { node->type = block->type; } /* compute_Jmp */ +/** + * (Re-)compute the type for the Return node. + * + * @param node the node + */ +static void compute_Return(node_t *node) { + /* The Return node is NOT dead if it is in a reachable block. + * This is already checked in compute(). so we can return + * Reachable here. */ + node->type.tv = tarval_reachable; +} /* compute_Return */ + /** * (Re-)compute the type for the End node. * @@ -1880,7 +1892,7 @@ static void compute_Jmp(node_t *node) { static void compute_End(node_t *node) { /* the End node is NOT dead of course */ node->type.tv = tarval_reachable; -} +} /* compute_End */ /** * (Re-)compute the type for a SymConst node. @@ -3246,6 +3258,7 @@ static void set_compute_functions(void) { SET(Cmp); SET(Proj); SET(Confirm); + SET(Return); SET(End); if (op_Max != NULL)