initial checkin
[libfirm] / ir / be / beinverse.h
1 /**
2  * Inverse operations
3  * @author Adam Szalkowski
4  * @date 2006-05-08
5  */
6
7 #ifndef BE_INVERSE_H_
8 #define BE_INVERSE_H_
9
10 typedef struct be_inverse_t_ {
11   int        n;
12   int        costs;
13
14   /** nodes for this inverse operation. shall be in
15    *  schedule order. last element is the target value
16    */
17   ir_node  **nodes;
18 } be_inverse_t;
19
20 /**
21  * Returns an inverse operation which yields the i-th argument
22  * of the given node as result.
23  *
24  * @param irn       The original operation
25  * @param i         Index of the argument we want the inverse oparation to yield
26  * @param inverse   struct to be filled with the resulting inverse op
27  * @param obstack   The obstack to use for allocation of the returned nodes array
28  */
29 be_inverse_t *
30 be_get_inverse(ir_node * irn, int i, be_inverse_t * inverse, struct obstack * obstack);
31
32 #endif