X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flower%2Flower_hl.c;h=f1263f8f1942481e13d8dc9c79d61215931fd316;hb=f600524c363556c785b85c0dff8792d04f73e252;hp=70730bd8ef4873f4a873cf7a70e74401375f769b;hpb=83811ec18bcb88ff5a45c8b10303636d34bf67ee;p=libfirm diff --git a/ir/lower/lower_hl.c b/ir/lower/lower_hl.c index 70730bd8e..f1263f8f1 100644 --- a/ir/lower/lower_hl.c +++ b/ir/lower/lower_hl.c @@ -52,13 +52,14 @@ static void lower_sel(ir_node *sel) { assert(is_Sel(sel)); + /* Do not lower frame type/global offset table access: must be lowered by the backend. */ + ptr = get_Sel_ptr(sel); + if (ptr == get_irg_frame(current_ir_graph)) + return; + ent = get_Sel_entity(sel); owner = get_entity_owner(ent); - /* Do not lower frame type access: must be lowered by the backend. */ - if (is_frame_type(owner)) - return; - /* * Cannot handle value param entities here. * Must be lowered by the backend. @@ -66,7 +67,6 @@ static void lower_sel(ir_node *sel) { if (is_value_param_type(owner)) return; - ptr = get_Sel_ptr(sel); dbg = get_irn_dbg_info(sel); mode = get_irn_mode(sel); @@ -590,7 +590,7 @@ static void lower_bf_access(ir_node *irn, void *env) { */ void lower_highlevel_graph(ir_graph *irg, int lower_bitfields) { - if(lower_bitfields) { + if (lower_bitfields) { /* First step: lower bitfield access: must be run as long as Sels still * exists. */ irg_walk_graph(irg, NULL, lower_bf_access, NULL); @@ -598,12 +598,14 @@ void lower_highlevel_graph(ir_graph *irg, int lower_bitfields) { /* Finally: lower SymConst-Size and Sel nodes, Casts, unaligned Load/Stores. */ irg_walk_graph(irg, NULL, lower_irnode, NULL); - set_irg_phase_low(irg); -} /* lower_highlevel */ +} /* lower_highlevel_graph */ +/* + * does the same as lower_highlevel() for all nodes on the const code irg + */ void lower_const_code(void) { walk_const_code(NULL, lower_irnode, NULL); -} +} /* lower_const_code */ /* * Replaces SymConsts by a real constant if possible.