X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firopt_t.h;h=eb3bdff80e70e42f0d849cb29fc2ccd1bdb42884;hb=f9d25133f86594ca2b1f33fb0b41a591ecc9b914;hp=996c336a9f1ee93927e81d30b45a00311baa27db;hpb=c2b4a9f3d77fda7989e9cbd6293b9f9f58f4221c;p=libfirm diff --git a/ir/ir/iropt_t.h b/ir/ir/iropt_t.h index 996c336a9..eb3bdff80 100644 --- a/ir/ir/iropt_t.h +++ b/ir/ir/iropt_t.h @@ -38,5 +38,23 @@ ir_node *optimize_node (ir_node *n); ir_node *optimize_in_place_2 (ir_node *n); +/* Calculate a hash value of a node. */ +unsigned ir_node_hash (ir_node *node); + +/** + * Returns the tarval of a Const node or tarval_bad for all other nodes. + */ +static INLINE tarval * +value_of(ir_node *n) { + if ((n != NULL) && (get_irn_op(n) == op_Const)) + return get_Const_tarval(n); /* might return tarval_bad */ + else + return tarval_bad; +} + +/** + * set the default ir op operations + */ +ir_op *firm_set_default_operations(ir_op *op); # endif /* _IROPT_T_H_ */