X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firverify.c;h=4f6001acb2119b4ae93e96a3dc47da759cf25c04;hb=34e3b8d50bce639e760da7233524a4db85c80290;hp=7e99f05f71095cd365d92b071429a1ab550852b9;hpb=3db23eee84cbabb3f399f1ca820948114a9c837c;p=libfirm diff --git a/ir/ir/irverify.c b/ir/ir/irverify.c index 7e99f05f7..4f6001acb 100644 --- a/ir/ir/irverify.c +++ b/ir/ir/irverify.c @@ -1,20 +1,6 @@ /* - * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved. - * * This file is part of libFirm. - * - * This file may be distributed and/or modified under the terms of the - * GNU General Public License version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * Licensees holding valid libFirm Professional Edition licenses may use - * this file in accordance with the libFirm Commercial License. - * Agreement provided with the Software. - * - * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE. + * Copyright (C) 2012 University of Karlsruhe. */ /** @@ -553,18 +539,16 @@ static int verify_node_Proj_Alloc(const ir_node *p) */ static int verify_node_Proj_Proj(const ir_node *p) { - ir_mode *mode = get_irn_mode(p); - ir_node *pred = get_Proj_pred(p); - long proj = get_Proj_proj(p); - long nr = get_Proj_proj(pred); - ir_type *mt; /* A method type */ + ir_mode *mode = get_irn_mode(p); + ir_node *pred = get_Proj_pred(p); + ir_node *predpred = get_Proj_pred(pred); + long proj = get_Proj_proj(p); + long nr = get_Proj_proj(pred); - pred = skip_Id(get_Proj_pred(pred)); - ASSERT_AND_RET((get_irn_mode(pred) == mode_T), "Proj from something not a tuple", 0); - - switch (get_irn_opcode(pred)) { - case iro_Start: - mt = get_entity_type(get_irg_entity(get_irn_irg(pred))); + switch (get_irn_opcode(predpred)) { + case iro_Start:; + ir_graph *irg = get_irn_irg(p); + ir_type *mt = get_entity_type(get_irg_entity(irg)); if (nr == pn_Start_T_args) { ASSERT_AND_RET( @@ -575,10 +559,7 @@ static int verify_node_Proj_Proj(const ir_node *p) "More Projs for args than args in type", 0 ); ir_type *param_type = get_method_param_type(mt, proj); - if (mode_is_reference(mode) && (is_compound_type(param_type) || is_Array_type(param_type))) - /* value argument */ break; - - if (!irg_is_constrained(get_irn_irg(pred), IR_GRAPH_CONSTRAINT_BACKEND)) { + if (!irg_is_constrained(irg, IR_GRAPH_CONSTRAINT_BACKEND)) { ASSERT_AND_RET_DBG( (mode == get_type_mode(param_type)), "Mode of Proj from Start doesn't match mode of param type.", 0, @@ -593,7 +574,7 @@ static int verify_node_Proj_Proj(const ir_node *p) ASSERT_AND_RET( (proj >= 0 && mode_is_datab(mode)), "wrong Proj from Proj from Call", 0); - mt = get_Call_type(pred); + mt = get_Call_type(predpred); ASSERT_AND_RET(is_unknown_type(mt) || is_Method_type(mt), "wrong call type on call", 0); ASSERT_AND_RET(