More missing config.h
[libfirm] / ir / be / ia32 / ia32_new_nodes.c
index 9369172..fe8656a 100644 (file)
@@ -1094,19 +1094,11 @@ arch_irn_flags_t get_ia32_out_flags(const ir_node *node, int pos) {
 }
 
 /**
- * Set the number of available execution units for this node.
+ * Get the list of available execution units.
  */
-void set_ia32_n_exec_units(ir_node *node, unsigned n) {
-       ia32_attr_t *attr  = get_ia32_attr(node);
-       attr->n_exec_units = n;
-}
-
-/**
- * Get the number of available execution units for this node.
- */
-unsigned get_ia32_n_exec_units(const ir_node *node) {
+const be_execution_unit_t ***get_ia32_exec_units(const ir_node *node) {
        ia32_attr_t *attr = get_ia32_attr(node);
-       return attr->n_exec_units;
+       return attr->exec_units;
 }
 
 #ifndef NDEBUG
@@ -1356,12 +1348,10 @@ const arch_register_t *get_ia32_out_reg(const ir_node *node, int pos) {
  * Initializes the nodes attributes.
  */
 void init_ia32_attributes(ir_node *node, arch_irn_flags_t flags, const ia32_register_req_t **in_reqs,
-                                                 const ia32_register_req_t **out_reqs, const be_execution_unit_t **execution_units,
+                                                 const ia32_register_req_t **out_reqs, const be_execution_unit_t ***execution_units,
                                                  int n_res, unsigned latency)
 {
-       ia32_attr_t         *attr = get_ia32_attr(node);
-       unsigned            i;
-       be_execution_unit_t *unit;
+       ia32_attr_t *attr = get_ia32_attr(node);
 
        set_ia32_flags(node, flags);
        set_ia32_in_req_all(node, in_reqs);
@@ -1369,13 +1359,7 @@ void init_ia32_attributes(ir_node *node, arch_irn_flags_t flags, const ia32_regi
        set_ia32_latency(node, latency);
        set_ia32_n_res(node, n_res);
 
-       if (execution_units) {
-               for (i = 0, unit = execution_units[0]; unit; unit = execution_units[++i])
-                       /* do nothing but count number of given units */ ;
-               set_ia32_n_exec_units(node, i);
-               attr->exec_units = execution_units;
-       }
-       /* else attr is already zero'ed out */
+       attr->exec_units = execution_units;
 
        attr->out_flags = NEW_ARR_D(int, get_irg_obstack(get_irn_irg(node)), n_res);
        memset(attr->out_flags, 0, n_res * sizeof(attr->out_flags[0]));