#define DEL_ARR_F(arr) (XMALLOC_TRACE _del_arr_f ((arr)))
/**
- * Creates a dynamic array on a obstack.
+ * Creates a dynamic array on an obstack.
*
* @param type The element type of the new array.
- * @param obstack An struct obstack * were the data will be allocated
- * @param nelts a size_t expression evaluating to the number of elements
+ * @param obstack A struct obstack * were the data will be allocated
+ * @param nelts A size_t expression evaluating to the number of elements
*
* This macro creates a dynamic array of a given type at runtime.
* The size of the array cannot be changed later.
* Searches an element pointer in a pset.
*
* @param pset the pset to search in
- * @param key the element to is searched
+ * @param key the element to search
* @param hash the hash value of key
*
* @return
* @note
* It is not possible to insert on element more than once. If a element
* that should be inserted is already in the set, this functions does
- * nothing but returning its set_entry.
+ * nothing but returning its already existing set_entry.
*/
void *pset_insert (pset *pset, const void *key, unsigned hash);
int id_is_suffix (ident *suffix, ident *id);
/**
- * Returns true if infix is a contained in id. (Can be suffix or prefix)
+ * Returns true if infix is contained in id. (Can be suffix or prefix)
*
* @param infix - the infix
* @param id - the ident to search in
* ir_node *new_Free (ir_node *store, ir_node *ptr, ir_node *size,
* type *free_type);
* ir_node *new_Proj (ir_node *arg, ir_mode *mode, long proj);
-=======
- * ir_node *new_simpleSel(ir_node *store, ir_node *objptr, entity *ent);
- * ir_node *new_Sel (ir_node *store, ir_node *objptr, int arity,
- * ir_node **in, entity *ent);
- * ir_node *new_Call (ir_node *store, ir_node *callee, int arity,
- * ir_node **in, type_method *type);
- * ir_node *new_Add (ir_node *op1, ir_node *op2, ir_mode *mode);
- * ir_node *new_Sub (ir_node *op1, ir_node *op2, ir_mode *mode);
- * ir_node *new_Minus (ir_node *op, ir_mode *mode);
- * ir_node *new_Mul (ir_node *op1, ir_node *op2, ir_mode *mode);
- * ir_node *new_Quot (ir_node *memop, ir_node *op1, ir_node *op2);
- * ir_node *new_DivMod (ir_node *memop, ir_node *op1, ir_node *op2);
- * ir_node *new_Div (ir_node *memop, ir_node *op1, ir_node *op2);
- * ir_node *new_Mod (ir_node *memop, ir_node *op1, ir_node *op2);
- * ir_node *new_Abs (ir_node *op, ir_mode *mode);
- * ir_node *new_And (ir_node *op1, ir_node *op2, ir_mode *mode);
- * ir_node *new_Or (ir_node *op1, ir_node *op2, ir_mode *mode);
- * ir_node *new_Eor (ir_node *op1, ir_node *op2, ir_mode *mode);
- * ir_node *new_Not (ir_node *op, ir_mode *mode);
- * ir_node *new_Shl (ir_node *op, ir_node *k, ir_mode *mode);
- * ir_node *new_Shr (ir_node *op, ir_node *k, ir_mode *mode);
- * ir_node *new_Shrs (ir_node *op, ir_node *k, ir_mode *mode);
- * ir_node *new_Rot (ir_node *op, ir_node *k, ir_mode *mode);
- * ir_node *new_Cmp (ir_node *op1, ir_node *op2);
- * ir_node *new_Conv (ir_node *op, ir_mode *mode);
- * ir_node *new_Cast (ir_node *op, type *to_tp);
- * ir_node *new_Load (ir_node *store, ir_node *addr);
- * ir_node *new_Store (ir_node *store, ir_node *addr, ir_node *val);
- * ir_node *new_Alloc (ir_node *store, ir_node *size, type *alloc_type,
- * where_alloc where);
- * ir_node *new_Free (ir_node *store, ir_node *ptr, ir_node *size,
- * type *free_type);
- * ir_node *new_Proj (ir_node *arg, ir_mode *mode, long proj);
* ir_node *new_FuncCall (ir_node *store, ir_node *callee, int arity,
* ir_node **in, type_method *type);
*
/** Fix the number of predecessors of an immature block. */
void mature_immBlock (ir_node *block);
+#define mature_cur_block() mature_immBlock(get_cur_block());
/** Get the current value of a local variable.
void set_opt_global_cse (int value);
/** Enables/Disables unreachable code elimination.
+ *
+ * If set, evaluate conditions of conditional branch and replace the
+ * branch with a Jmp/Bad Tuple.
*
* If opt_unreachable_code == 1 replace nodes (except Block,
* Phi and Tuple) with a Bad predecessor by the Bad node.
ir_graph **callees; /**< For callgraph analyses. */
int *callee_isbe; /**< For callgraph analyses: set if backedge. */
int callgraph_loop_depth;
- int callgraph_weighted_loop_depth;
int callgraph_recursion_depth;
ir_loop *l;
* @function get_irn_block
* @see get_nodes_block()
*/
-
/**
* Projection numbers for result of Start node: use for Proj nodes!
*/
/** Output information about an entity and its owner */
#define DDMEO(X) printf("%s(l.%i) %s (own: %s): %ld (%p)\n", __MYFUNC__, __LINE__, get_entity_name(X), get_type_name(get_entity_owner(X)), get_entity_nr(X), (void *)(X))
/** Output information about a graph */
-#define DDMG(X) printf("%s(l.%i) %s: %ld (%p)\n", __MYFUNC__, __LINE__, get_entity_name(get_irg_entity(X)), get_irg_graph_nr(X), (void *)(X))
+#define DDMG(X) printf("%s(l.%i) graph %s: %ld (%p) in %s %s.\n", __MYFUNC__, __LINE__, get_entity_name(get_irg_entity(X)), get_irg_graph_nr(X), (void *)(X), get_type_tpop_name(get_entity_owner(get_irg_entity(X))), get_type_name(get_entity_owner(get_irg_entity(X))))
/** Output information about an ident */
#define DDMI(X) printf("%s(l.%i) %s: %p\n", __MYFUNC__, __LINE__, get_id_str(X), (void *)(X))
/** Output information about a mode */
# include "irgraph_t.h"
# include "irvrfy.h"
# include "irgwalk.h"
+# include "irdump.h"
#ifdef NDEBUG
/*
#else
#define ASSERT_AND_RET(expr, string, ret) \
do { \
- if (opt_do_node_verification == NODE_VERIFICATION_ON) \
- assert((expr) && string); \
+ if (opt_do_node_verification == NODE_VERIFICATION_ON) {\
+ if (!(expr)) dump_ir_block_graph(current_ir_graph, "-assert"); \
+ assert((expr) && string); } \
if (!(expr)) { \
if (opt_do_node_verification == NODE_VERIFICATION_REPORT) \
fprintf(stderr, #expr " : " string "\n"); \
);
break;
- case iro_Const: {
- ASSERT_AND_RET(
- /* Const: BB --> data */
- (mode_is_data (mymode) ||
- mymode == mode_b) /* we want boolean constants for static evaluation */
- ,"Const node", 0 /* of Cmp. */
- );
- } break;
-
+ case iro_Const: {
+ ASSERT_AND_RET(
+ /* Const: BB --> data */
+ (mode_is_data (mymode) ||
+ mymode == mode_b) /* we want boolean constants for static evaluation */
+ ,"Const node", 0 /* of Cmp. */
+ );
+ } break;
case iro_SymConst:
if (get_SymConst_kind(n) == symconst_addr_ent) {
entity *ent = get_SymConst_entity(n);
if (is_method_type(get_entity_type(ent)) &&
get_irn_irg(n) != get_const_code_irg()) {
-#if 0
+#if 1
ASSERT_AND_RET((get_entity_peculiarity(ent) != peculiarity_description),
"A constant must address an existing method.", 0);
#endif