2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief A data structure to treat nodes and node-proj collections uniformly.
9 * @author Sebastian Hack
11 #ifndef FIRM_BE_BEINSN_T_H
12 #define FIRM_BE_BEINSN_T_H
14 #include "firm_types.h"
18 #include "bechordal.h"
20 typedef struct be_operand_t be_operand_t;
21 typedef struct be_insn_t be_insn_t;
24 ir_node *carrier; /**< node representing the operand value (Proj or the node itself for defs, the used value for uses) */
25 be_operand_t *partner; /**< used in bechordal later... (TODO what does it do?) */
26 unsigned const *regs; /**< admissible register bitset */
30 be_operand_t *ops; /**< the values used and defined by the insn */
31 int n_ops; /**< length of the ops array */
32 int use_start; /**< entries [0-use_start) in ops are defs,
33 [use_start-n_ops) uses */
34 ir_node *irn; /**< ir_node of the instruction */
38 * Create a be_insn_t for an IR node.
40 * @param env the insn construction environment
41 * @param irn the irn for which the be_insn should be build
43 * @return the be_insn for the IR node
45 be_insn_t *be_scan_insn(be_chordal_env_t *env, ir_node *irn);
47 #endif /* FIRM_BE_BEINSN_T_H */