#include "irtypeinfo.h"
#include "irprog.h"
#include "pseudo_irg.h"
+#include "type_t.h"
+#include "tr_inheritance.h"
#include "irloop.h"
+#include "execution_frequency.h"
#include "obst.h"
#include "pset.h"
-#include "type_t.h"
+#include "set.h"
#define FRAME_TP_SUFFIX "frame_tp"
+/**
+ * Edge info to put into an irg.
+ */
+typedef struct _irg_edge_info_t {
+ set *edges;
+ unsigned activated : 1;
+} irg_edge_info_t;
+
+
/** ir_graph holds all information for a procedure */
struct ir_graph {
firm_kind kind; /**< always set to k_ir_graph*/
globals as well as global procedures. */
struct ir_node *initial_mem; /**< initial memory of this graph */
struct ir_node *args; /**< methods arguments */
- struct ir_node **proj_args; /**< projs off the methods arguments */
+ struct ir_node **proj_args; /**< projs of the methods arguments */
struct ir_node *bad; /**< bad node of this ir_graph, the one and
only in this graph */
struct ir_node *no_mem; /**< NoMem node of this ir_graph, the one and
op_pin_state op_pin_state_pinned; /**< Flag for status of nodes */
irg_outs_state outs_state; /**< Out edges. */
irg_dom_state dom_state; /**< Dominator information */
- irg_typeinfo_state typeinfo_state; /**< Validity of type information */
+ ir_typeinfo_state typeinfo_state; /**< Validity of type information */
irg_callee_info_state callee_info_state; /**< Validity of callee information */
irg_inline_property inline_property; /**< How to handle inlineing. */
irg_loopinfo_state loopinfo_state; /**< state of loop information */
+ exec_freq_state execfreq_state; /**< state of execution freqency information */
+ ir_class_cast_state class_cast_state; /**< kind of cast operations in code. */
/* -- Fields for construction -- */
#if USE_EXPLICIT_PHI_IN_STACK
struct Phi_in_stack *Phi_in_stack; /**< needed for automatic Phi construction */
#endif
int n_loc; /**< number of local variable in this
- procedure including procedure parameters. */
+ procedure including procedure parameters. */
+ void **loc_descriptions; /**< storage for local variable desriptions */
/* -- Fields for optimizations / analysis information -- */
pset *value_table; /**< hash table for global value numbering (cse)
unsigned char *caller_isbe; /**< For callgraph analysis: set if backedge. */
ir_graph **callees; /**< For callgraph analysis. */
unsigned char *callee_isbe; /**< For callgraph analysis: set if backedge. */
- int callgraph_loop_depth;
- int callgraph_recursion_depth;
+ int callgraph_loop_depth; /**< For callgraph analysis */
+ int callgraph_recursion_depth; /**< For callgraph analysis */
+ double method_execution_frequency; /**< For callgraph analysis */
+
ir_loop *l;
/* -- Fields for Walking the graph -- */
int graph_nr; /**< a unique graph number for each graph to make output
readable. */
#endif
+
+#if FIRM_EDGES_INPLACE
+ irg_edge_info_t edge_info; /**< edge info for automatic outs */
+#endif
};
/**
static INLINE void
_set_irg_outs_inconsistent(ir_graph *irg) {
- irg->outs_state = outs_inconsistent;
+ if (irg->outs_state == outs_consistent)
+ irg->outs_state = outs_inconsistent;
}
static INLINE irg_dom_state