From 4a2305f76e63a02afdb9f893c2b2527b849de0df Mon Sep 17 00:00:00 2001 From: Adam Szalkowski Date: Mon, 8 May 2006 16:10:19 +0000 Subject: [PATCH] initial checkin a prototype of a struct and function to interface with the machine dependent backend to yield an inverse operation for a given irn --- ir/be/beinverse.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ir/be/beinverse.h diff --git a/ir/be/beinverse.h b/ir/be/beinverse.h new file mode 100644 index 000000000..a12bcdd84 --- /dev/null +++ b/ir/be/beinverse.h @@ -0,0 +1,32 @@ +/** + * Inverse operations + * @author Adam Szalkowski + * @date 2006-05-08 + */ + +#ifndef BE_INVERSE_H_ +#define BE_INVERSE_H_ + +typedef struct be_inverse_t_ { + int n; + int costs; + + /** nodes for this inverse operation. shall be in + * schedule order. last element is the target value + */ + ir_node **nodes; +} be_inverse_t; + +/** + * Returns an inverse operation which yields the i-th argument + * of the given node as result. + * + * @param irn The original operation + * @param i Index of the argument we want the inverse oparation to yield + * @param inverse struct to be filled with the resulting inverse op + * @param obstack The obstack to use for allocation of the returned nodes array + */ +be_inverse_t * +be_get_inverse(ir_node * irn, int i, be_inverse_t * inverse, struct obstack * obstack); + +#endif -- 2.20.1