becopyilp: Turn the colouring suffix linked list into an array.
[libfirm] / ir / be / becopyilp_t.h
index 77605a8..de8925e 100644 (file)
@@ -13,7 +13,6 @@
 #define FIRM_BE_BECOPYILP_T_H
 
 #include "firm_types.h"
-#include "pset.h"
 #include "becopyopt_t.h"
 
 /******************************************************************************
 
  *****************************************************************************/
 
-typedef struct coloring_suffix_t coloring_suffix_t;
-
-struct coloring_suffix_t {
-       coloring_suffix_t *next;
-       ir_node           *irn;
-};
-
 typedef struct size_red_t {
-       copy_opt_t        *co;
-       pset              *all_removed;   /**< All nodes removed during problem size reduction */
-       coloring_suffix_t *col_suff;      /**< Coloring suffix. Reverse would be a PEO prefix */
-       struct obstack    ob;
+       copy_opt_t    *co;
+       ir_node      **col_suff;    /**< Coloring suffix. A PEO prefix. */
+       ir_nodeset_t   all_removed; /**< All nodes removed during problem size reduction */
 } size_red_t;
 
 /**
  * Checks if a node has already been removed
  */
-#define sr_is_removed(sr, irn)   pset_find_ptr((sr)->all_removed, irn)
+static inline bool sr_is_removed(size_red_t const *const sr, ir_node const *const irn)
+{
+       return ir_nodeset_contains(&sr->all_removed, irn);
+}
 
 /**
  * TODO: This search is necessary because during the construction of the