beinsn: Remove the write-only attribute pos from be_operand_t.
[libfirm] / ir / be / beinsn_t.h
index 24e6138..7f3de18 100644 (file)
 #include "obst.h"
 
 #include "bearch.h"
-#include "beirg.h"
+#include "bechordal.h"
 
 typedef struct be_operand_t  be_operand_t;
 typedef struct be_insn_t     be_insn_t;
-typedef struct be_insn_env_t be_insn_env_t;
 
 struct be_operand_t {
        ir_node *irn;                   /**< Firm node of the insn this operand belongs to */
        ir_node *carrier;               /**< node representing the operand value (Proj or the node itself for defs, the used value for uses) */
        be_operand_t *partner;          /**< used in bechordal later... (TODO what does it do?) */
        const bitset_t *regs;           /**< admissible register bitset */
-       int pos;                        /**< pos of the operand (0 to n are inputs, -1 to -n are outputs) */
        const arch_register_req_t *req; /**< register constraints for the carrier node */
-       unsigned has_constraints : 1;   /**< the carrier node has register constraints (the constraint type is limited) */
 };
 
 struct be_insn_t {
@@ -51,23 +48,18 @@ struct be_insn_t {
        int n_ops;                     /**< length of the ops array */
        int use_start;                 /**< entries [0-use_start) in ops are defs,
                                            [use_start-n_ops) uses */
-       ir_node *next_insn;            /**< next instruction in schedule */
        ir_node *irn;                  /**< ir_node of the instruction */
-       unsigned in_constraints  : 1;  /**< instruction has input constraints */
-       unsigned out_constraints : 1;  /**< instruction has output constraints */
        unsigned has_constraints : 1;  /**< in_constraints or out_constraints true */
-       unsigned pre_colored     : 1;  /**< all defined values already have a register assigned */
 };
 
-struct be_insn_env_t {
-       struct obstack              *obst;
-       const arch_register_class_t *cls;
-       bitset_t                    *allocatable_regs;
-};
-
-#define be_insn_n_defs(insn) ((insn)->use_start)
-#define be_insn_n_uses(insn) ((insn)->n_ops - (insn)->use_start)
-
-be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn);
+/**
+ * Create a be_insn_t for an IR node.
+ *
+ * @param env      the insn construction environment
+ * @param irn      the irn for which the be_insn should be build
+ *
+ * @return the be_insn for the IR node
+ */
+be_insn_t *be_scan_insn(be_chordal_env_t const *env, ir_node *irn);
 
 #endif /* FIRM_BE_BEINSN_T_H */