# include "config.h"
#endif
+#include "pset.h"
+
#include <stdlib.h>
#include "irnode_t.h"
#include "irbackedge_t.h"
#include "irtools.h"
+#include "irprintf.h"
/* the famous clear_link implementation. */
void firm_clear_link(ir_node *n, void *env) {
/*
* Creates an exact copy of a node.
- * The copy resists on the sane graph in the same block.
+ * The copy resides in the same graph in the same block.
*/
-ir_node *exact_copy(ir_node *n) {
+ir_node *exact_copy(const ir_node *n) {
ir_graph *irg = get_irn_irg(n);
ir_node *res, *block = NULL;
if (is_no_Block(n))
- block = get_irn_n(n, -1);
+ block = get_nodes_block(n);
res = new_ir_node(get_irn_dbg_info(n),
irg,
new_backedge_info(res);
return res;
}
+
+void firm_pset_dump(pset *set)
+{
+ void *obj;
+
+ foreach_pset(set, obj) {
+ ir_fprintf(stderr, "%+F\n", obj);
+ }
+}