becopyilp: Turn the colouring suffix linked list into an array.
[libfirm] / ir / be / becopyilp_t.h
index 362c5db..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;
 
-/**
- * Just prepare. Do nothing yet.
- */
-size_red_t *new_size_red(copy_opt_t *co);
-
 /**
  * Checks if a node has already been removed
  */
-#define sr_is_removed(sr, irn)   pset_find_ptr((sr)->all_removed, irn)
-
-/**
- * Virtually remove all nodes not related to the problem
- * (simplicial AND not adjacent to a equal-color-edge)
- */
-void sr_remove(size_red_t *sr);
-
-/**
- * Virtually reinsert the nodes removed before and color them
- */
-void sr_reinsert(size_red_t *sr);
-
-/**
- * Free all space...
- */
-void free_size_red(size_red_t *sr);
+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