*/
#include <string.h>
#include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/mempool.h>
+#include <mono/metadata/mempool-internals.h>
#include "mini.h"
bb->idom = doms [bb->dfn];
if (bb->idom)
- bb->idom->dominated = g_list_prepend (bb->idom->dominated, bb);
+ bb->idom->dominated = g_slist_prepend_mempool (cfg->mempool, bb->idom->dominated, bb);
}
/* The entry bb */
#endif
}
+#if 0
+
static void
check_dominance_frontier (MonoBasicBlock *x, MonoBasicBlock *t)
{
}
}
+#endif
+
/**
* Compute dominance frontiers using the algorithm from the same paper.
*/
int i;
mono_bitset_foreach_bit (set, i, m->num_bblocks) {
- mono_bitset_union (dest, m->bblocks [i]->dfrontier);
+ mono_bitset_union_fast (dest, m->bblocks [i]->dfrontier);
}
}
for (i = 0; i < cfg->num_bblocks; ++i) {
if (cfg->bblocks[i]->dominated) {
- g_list_free (cfg->bblocks[i]->dominated);
cfg->bblocks[i]->dominated = NULL;
}
}