* Paolo Molaro (lupus@ximian.com)
*
* (C) 2003 Ximian, Inc.
+ * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
*/
#include <string.h>
#include <mono/metadata/debug-helpers.h>
compute_dominators (MonoCompile *cfg)
{
int bindex, i, bitsize;
- char* mem;
MonoBasicBlock *entry;
MonoBasicBlock **doms;
gboolean changed;
bitsize = mono_bitset_alloc_size (cfg->num_bblocks, 0);
- mem = mono_mempool_alloc0 (cfg->mempool, bitsize * cfg->num_bblocks);
-
entry = cfg->bblocks [0];
doms = g_new0 (MonoBasicBlock*, cfg->num_bblocks);
MonoBasicBlock *bb = cfg->bblocks [i];
MonoBasicBlock *cbb;
MonoBitSet *dominators;
+ char *mem;
+
+ mem = mono_mempool_alloc0 (cfg->mempool, bitsize);
bb->dominators = dominators = mono_bitset_mem_new (mem, cfg->num_bblocks, 0);
mem += bitsize;
/* The loop body start is the first bblock in the order they will be emitted */
MonoBasicBlock *h = cfg->bblocks [i];
MonoBasicBlock *body_start = h;
+#if defined(__native_client_codegen__)
MonoInst *inst;
+#endif
GList *l;
for (l = h->loop_blocks; l; l = l->next) {