set_irg_start (res, start);
/* Proj results of start node */
- projX = new_Proj(start, mode_X, pn_Start_X_initial_exec);
- set_irg_frame (res, new_Proj(start, mode_P_data, pn_Start_P_frame_base));
- set_irg_globals (res, new_Proj(start, mode_P_data, pn_Start_P_globals));
- set_irg_tls (res, new_Proj(start, mode_P_data, pn_Start_P_tls));
- set_irg_args (res, new_Proj(start, mode_T, pn_Start_T_args));
- initial_mem = new_Proj(start, mode_M, pn_Start_M);
+ projX = new_Proj(start, mode_X, pn_Start_X_initial_exec);
+ set_irg_frame (res, new_Proj(start, mode_P_data, pn_Start_P_frame_base));
+ set_irg_globals (res, new_Proj(start, mode_P_data, pn_Start_P_globals));
+ set_irg_tls (res, new_Proj(start, mode_P_data, pn_Start_P_tls));
+ set_irg_args (res, new_Proj(start, mode_T, pn_Start_T_args));
+ set_irg_value_param_base(res, new_Proj(start, mode_P_data, pn_Start_P_value_arg_base));
+ initial_mem = new_Proj(start, mode_M, pn_Start_M);
set_irg_initial_mem(res, initial_mem);
add_immBlock_pred(start_block, projX);
_set_irg_args(irg, node);
}
+ir_node *
+(get_irg_value_param_base)(const ir_graph *irg) {
+ return _get_irg_value_param_base(irg);
+}
+
+void
+(set_irg_value_param_base)(ir_graph *irg, ir_node *node) {
+ _set_irg_value_param_base(irg, node);
+}
+
ir_node **
(get_irg_proj_args) (const ir_graph *irg) {
return _get_irg_proj_args (irg);
* Index constants for nodes that can be accessed through the graph itself.
*/
enum irg_anchors {
- anchor_start_block = 0, /**< block the start node will belong to */
- anchor_start, /**< start node of this ir_graph */
- anchor_end_block, /**< block the end node will belong to */
- anchor_end, /**< end node of this ir_graph */
- anchor_end_reg, /**< end node of this ir_graph */
- anchor_end_except, /**< end node of this ir_graph */
- anchor_frame, /**< method's frame */
- anchor_globals, /**< pointer to the data segment containing all
- globals as well as global procedures. */
- anchor_tls, /**< pointer to the thread local storage containing all
- thread local data. */
- anchor_initial_mem, /**< initial memory of this graph */
- anchor_args, /**< methods arguments */
- anchor_bad, /**< bad node of this ir_graph, the one and
- only in this graph */
- anchor_no_mem, /**< NoMem node of this ir_graph, the one and only in this graph */
+ anchor_start_block = 0, /**< block the start node will belong to */
+ anchor_start, /**< start node of this ir_graph */
+ anchor_end_block, /**< block the end node will belong to */
+ anchor_end, /**< end node of this ir_graph */
+ anchor_end_reg, /**< end node of this ir_graph */
+ anchor_end_except, /**< end node of this ir_graph */
+ anchor_frame, /**< method's frame */
+ anchor_globals, /**< pointer to the data segment containing all
+ globals as well as global procedures. */
+ anchor_tls, /**< pointer to the thread local storage containing all
+ thread local data. */
+ anchor_initial_mem, /**< initial memory of this graph */
+ anchor_args, /**< methods arguments */
+ anchor_value_param_base, /**< method value param base */
+ anchor_bad, /**< bad node of this ir_graph, the one and
+ only in this graph */
+ anchor_no_mem, /**< NoMem node of this ir_graph, the one and only in this graph */
anchor_max
};
irg->anchors[anchor_args] = node;
}
+static INLINE ir_node *
+_get_irg_value_param_base(const ir_graph *irg) {
+ return irg->anchors[anchor_value_param_base];
+}
+
+static INLINE void
+_set_irg_value_param_base(ir_graph *irg, ir_node *node) {
+ irg->anchors[anchor_value_param_base] = node;
+}
+
static INLINE ir_node **
_get_irg_proj_args(const ir_graph *irg) {
return irg->proj_args;
#define set_irg_initial_mem(irg, node) _set_irg_initial_mem(irg, node)
#define get_irg_args(irg) _get_irg_args(irg)
#define set_irg_args(irg, node) _set_irg_args(irg, node)
+#define get_irg_value_param_base(irg) _get_irg_value_param_base(irg)
+#define set_irg_value_param_base(irg, node) _set_irg_value_param_base(irg, node)
#define get_irg_bad(irg) _get_irg_bad(irg)
#define set_irg_bad(irg, node) _set_irg_bad(irg, node)
#define get_irg_no_mem(irg) _get_irg_no_mem(irg)