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