libFirm
Loading...
Searching...
No Matches
ircons.h
1/*
2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
4 */
5
294#ifndef FIRM_IR_IRCONS_H
295#define FIRM_IR_IRCONS_H
296
297#include "firm_types.h"
298#include "irnode.h"
299
300#include "begin.h"
301
319 ir_mode *mode, long value);
320
331FIRM_API ir_node *new_r_Const_long(ir_graph *irg, ir_mode *mode, long value);
332
340FIRM_API ir_node *new_d_Const_long(dbg_info *db, ir_mode *mode, long value);
341
353FIRM_API ir_node *new_Const_long(ir_mode *mode, long value);
354
363 int arity, ir_node *in[]);
364
366FIRM_API ir_node *new_r_Phi_loop(ir_node *block, int arity, ir_node *in[]);
367
369FIRM_API ir_node *new_d_Phi_loop(dbg_info *db, int arity, ir_node *in[]);
370
372FIRM_API ir_node *new_Phi_loop(int arity, ir_node *in[]);
373
389FIRM_API ir_node *new_rd_DivRL(dbg_info *db, ir_node *block, ir_node *memop,
390 ir_node *op1, ir_node *op2, int pinned);
391
400FIRM_API ir_node *new_r_DivRL(ir_node *block, ir_node *memop,
401 ir_node *op1, ir_node *op2, int pinned);
402
413FIRM_API ir_node *new_d_DivRL(dbg_info *db, ir_node *memop,
414 ir_node *op1, ir_node *op2, int pinned);
415
425FIRM_API ir_node *new_DivRL(ir_node *memop, ir_node *op1, ir_node *op2,
426 int pinned);
427
440
445
449FIRM_API void set_current_ir_graph(ir_graph *graph);
450
470FIRM_API ir_node *new_immBlock(void);
489
491FIRM_API void add_immBlock_pred(ir_node *immblock, ir_node *jmp);
492
494FIRM_API void mature_immBlock(ir_node *block);
495
502FIRM_API void set_cur_block(ir_node *target);
507FIRM_API void set_r_cur_block(ir_graph *irg, ir_node *target);
508
510FIRM_API ir_node *get_cur_block(void);
513
523FIRM_API ir_node *get_value(int pos, ir_mode *mode);
526FIRM_API ir_node *get_r_value(ir_graph *irg, int pos, ir_mode *mode);
527
536FIRM_API ir_mode *ir_guess_mode(int pos);
540FIRM_API ir_mode *ir_r_guess_mode(ir_graph *irg, int pos);
541
552FIRM_API void set_value(int pos, ir_node *value);
554FIRM_API void set_r_value(ir_graph *irg, int pos, ir_node *value);
555
562FIRM_API ir_node *get_store(void);
566
574FIRM_API void set_store(ir_node *store);
577FIRM_API void set_r_store(ir_graph *irg, ir_node *store);
578
583FIRM_API void keep_alive(ir_node *ka);
584
586FIRM_API void irg_finalize_cons(ir_graph *irg);
587
593FIRM_API void verify_new_node(ir_node *node);
594
601
604#include "end.h"
605
606#endif
struct dbg_info dbg_info
Source Reference.
Definition firm_types.h:40
ir_node * get_cur_block(void)
Returns the current block of the current graph.
void mature_immBlock(ir_node *block)
Finalize a Block node, when all control flows are known.
ir_node * new_r_immBlock(ir_graph *irg)
Create an immature Block.
ir_mode * ir_guess_mode(int pos)
Try to guess the mode of a local variable.
ir_node * new_immBlock(void)
Create an immature Block.
ir_node * get_store(void)
Returns the current memory state.
ir_mode * ir_r_guess_mode(ir_graph *irg, int pos)
Try to guess the mode of a local variable in a given graph.
void set_store(ir_node *store)
Memorize a new definition of the memory state.
ir_node * new_rd_immBlock(dbg_info *db, ir_graph *irg)
Create an immature Block.
void add_immBlock_pred(ir_node *immblock, ir_node *jmp)
Add a control flow edge to an immature block.
ir_graph * current_ir_graph
Global variable holding the graph which is currently constructed.
Definition ircons.h:439
void ir_set_uninitialized_local_variable_func(uninitialized_local_variable_func_t *func)
Register a new callback for the case that the value of an uninitialized variable is requested.
void set_r_cur_block(ir_graph *irg, ir_node *target)
Sets current block of a given graph.
void set_r_value(ir_graph *irg, int pos, ir_node *value)
Sets current value of a variable in a given graph.
void keep_alive(ir_node *ka)
keep this node alive even if End is not control-reachable from it
ir_node * get_r_store(ir_graph *irg)
Returns current memory state for a given graph.
void set_cur_block(ir_node *target)
Sets the current block in which the following constructors place the nodes they construct.
void set_value(int pos, ir_node *value)
Memorize a new definition of a variable.
void irg_finalize_cons(ir_graph *irg)
Puts the graph into state "phase_high".
ir_graph * get_current_ir_graph(void)
Returns graph which is currently constructed.
ir_node * new_d_immBlock(dbg_info *db)
Create an immature Block.
void set_r_store(ir_graph *irg, ir_node *store)
Sets current memory state for a given graph.
void verify_new_node(ir_node *node)
If firm is built in debug mode, verify that a newly created node is fine.
ir_node * get_value(int pos, ir_mode *mode)
Returns the current value of a local variable.
ir_node * get_r_cur_block(ir_graph *irg)
Returns current block of a given graph.
ir_node * uninitialized_local_variable_func_t(ir_graph *irg, ir_mode *mode, int pos)
This function is called, whenever a local variable is used before definition.
Definition firm_types.h:123
void set_current_ir_graph(ir_graph *graph)
Sets graph which is currently constructed.
ir_node * get_r_value(ir_graph *irg, int pos, ir_mode *mode)
Returns the current value of a local variable in given graph.
struct ir_graph ir_graph
Procedure Graph.
Definition firm_types.h:74
struct ir_mode ir_mode
SSA Value mode.
Definition firm_types.h:59
struct ir_node ir_node
Procedure Graph Node.
Definition firm_types.h:53
ir_node * new_r_Const_long(ir_graph *irg, ir_mode *mode, long value)
Constructor for a Const node.
ir_node * new_rd_Const_long(dbg_info *db, ir_graph *irg, ir_mode *mode, long value)
Constructor for a Const node.
ir_node * new_Const_long(ir_mode *mode, long value)
Make a const from a long.
ir_node * new_d_Const_long(dbg_info *db, ir_mode *mode, long value)
ir_node * new_r_DivRL(ir_node *block, ir_node *memop, ir_node *op1, ir_node *op2, int pinned)
Constructor for a remainderless Div node.
ir_node * new_d_DivRL(dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, int pinned)
Constructor for a remainderless Div node.
ir_node * new_DivRL(ir_node *memop, ir_node *op1, ir_node *op2, int pinned)
Constructor for a remainderless Div node.
ir_node * new_rd_DivRL(dbg_info *db, ir_node *block, ir_node *memop, ir_node *op1, ir_node *op2, int pinned)
Constructor for a remainderless Div node.
ir_node * new_d_Phi_loop(dbg_info *db, int arity, ir_node *in[])
Constructor for memory Phi with keep-alive edge.
ir_node * new_r_Phi_loop(ir_node *block, int arity, ir_node *in[])
Constructor for memory Phi with keep-alive edge.
ir_node * new_Phi_loop(int arity, ir_node *in[])
Constructor for memory Phi with keep-alive edge.
ir_node * new_rd_Phi_loop(dbg_info *db, ir_node *block, int arity, ir_node *in[])
Constructor for memory Phi with keep-alive edge.