From 256343d933c29b9d66940d6361cdc891f0a5df04 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 4 Nov 2005 08:36:08 +0000 Subject: [PATCH] new_rd_simpleSel() constructor added [r6867] --- ir/ir/ircons.c | 14 ++++++++++++++ ir/ir/ircons.h | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index e0b2c9792..74fa5d59c 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -1525,6 +1525,20 @@ new_rd_Free (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store, return res; } +ir_node * +new_rd_simpleSel (dbg_info *db, ir_graph *irg, ir_node *block, + ir_node *store, ir_node *objptr, entity *ent) +{ + ir_node *res; + ir_graph *rem = current_ir_graph; + + current_ir_graph = irg; + res = new_bd_Sel(db, block, store, objptr, 0, NULL, ent); + current_ir_graph = rem; + + return res; +} + ir_node * new_rd_Sel (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store, ir_node *objptr, int arity, ir_node **in, entity *ent) diff --git a/ir/ir/ircons.h b/ir/ir/ircons.h index 1af3fd7fd..101387895 100644 --- a/ir/ir/ircons.h +++ b/ir/ir/ircons.h @@ -1268,6 +1268,24 @@ ir_node *new_rd_SymConst_type_tag (dbg_info *db, ir_graph *irg, type *symbol, ty * Adds the SymConst to the start block of irg. */ ir_node *new_rd_SymConst_size (dbg_info *db, ir_graph *irg, type *symbol, type *tp); +/** Constructor for a simpleSel node. + * + * This is a shortcut for the new_rd_Sel() constructor. To be used for + * Sel nodes that do not select from an array, i.e., have no index + * inputs. It adds the two parameters 0, NULL. + * + * @param *db A pointer for debug information. + * @param *irg The ir graph the node belongs to. + * @param *block The ir block the node belongs to. + * @param *store The memory in which the object the entity should be + * selected from is allocated. + * @param *objptr The object from that the Sel operation selects a + * single attribute out. + * @param *ent The entity to select. + */ +ir_node *new_rd_simpleSel (dbg_info *db, ir_graph *irg, ir_node *block, + ir_node *store, ir_node *objptr, entity *ent); + /** Constructor for a Sel node. * * The select node selects an entity (field or method) from an entity -- 2.20.1