In .:
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 19 Aug 2008 00:28:34 +0000 (00:28 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 19 Aug 2008 00:28:34 +0000 (00:28 -0000)
2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>

* ssa.c:
* ssa2.c:
* mini.c:
* regalloc2.c:
* dominators.c: Remove duplicated functions that now are in
mempool-internals.h.

svn path=/trunk/mono/; revision=110894

mono/mini/ChangeLog
mono/mini/dominators.c
mono/mini/mini.c
mono/mini/regalloc2.c
mono/mini/ssa.c
mono/mini/ssa2.c

index 3240ec49dcbcb9768d1d2f1fc07a8c491fac345f..1af2d6810611895bc7331e374dad26f1da29ff79 100644 (file)
@@ -1,3 +1,12 @@
+2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * ssa.c:
+       * ssa2.c:
+       * mini.c:
+       * regalloc2.c:
+       * dominators.c: Remove duplicated functions that now are in
+       mempool-internals.h.
+
 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
 
        * aot-compiler.c: Fix warnings.
index 410c51ae130ec17c6acaee1598a99f1ba6a3026c..7f1b5826c6aec7fb6ef0ada6611cf2f42607dc63 100644 (file)
@@ -9,6 +9,8 @@
  */
 #include <string.h>
 #include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/mempool.h>
+#include <mono/metadata/mempool-internals.h>
 
 #include "mini.h"
 
  */
 #define HAS_DFN(bb, entry) ((bb)->dfn || ((bb) == entry))
 
-static inline GSList*
-g_slist_prepend_mempool (MonoMemPool *mp, GSList   *list,
-                                                gpointer  data)
-{
-  GSList *new_list;
-
-  new_list = mono_mempool_alloc (mp, sizeof (GSList));
-  new_list->data = data;
-  new_list->next = list;
-
-  return new_list;
-}
-
 /*
  * Compute dominators and immediate dominators using the algorithm in the
  * paper "A Simple, Fast Dominance Algorithm" by Keith D. Cooper, 
index 9574bc14f9642ed3d793fcaed122095305bf9155..6bb33fa5af93e374cae757eb12b9020ac0dc89df 100644 (file)
@@ -59,6 +59,7 @@
 #include <mono/metadata/security-core-clr.h>
 #include <mono/metadata/verify.h>
 #include <mono/metadata/verify-internals.h>
+#include <mono/metadata/mempool-internals.h>
 #include <mono/utils/mono-math.h>
 #include <mono/utils/mono-compiler.h>
 #include <mono/utils/mono-counters.h>
@@ -10114,19 +10115,6 @@ typedef struct {
        GSList *slots;
 } StackSlotInfo;
 
-static inline GSList*
-g_slist_prepend_mempool (MonoMemPool *mp, GSList   *list,
-                                                gpointer  data)
-{
-  GSList *new_list;
-
-  new_list = mono_mempool_alloc (mp, sizeof (GSList));
-  new_list->data = data;
-  new_list->next = list;
-
-  return new_list;
-}
-
 static gint 
 compare_by_interval_start_pos_func (gconstpointer a, gconstpointer b)
 {
index 5722c1a201a753cde61ef56f4c06664369678b51..848f70e2781c405d2944f61793cf9534b92f4b2b 100644 (file)
@@ -190,19 +190,6 @@ typedef struct MonoRegallocContext {
 #define dreg_is_fp(spec)  (spec [MONO_INST_DEST] == 'f')
 #endif
 
-static inline GSList*
-g_slist_prepend_mempool (MonoMemPool *mp, GSList   *list,
-                                                gpointer  data)
-{
-  GSList *new_list;
-
-  new_list = mono_mempool_alloc (mp, sizeof (GSList));
-  new_list->data = data;
-  new_list->next = list;
-
-  return new_list;
-}
-
 static inline GSList*
 g_slist_append_mempool (MonoMemPool *mp, GSList   *list,
                                                gpointer  data)
index 2c2fdc91afac94a176e59c314e6867645c2de0dc..c6a19c58dea7e0b44f3f54718752c08c0c26ad9d 100644 (file)
@@ -8,6 +8,8 @@
  */
 #include <string.h>
 #include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/mempool.h>
+#include <mono/metadata/mempool-internals.h>
 
 #include "mini.h"
 
                (dest)->type = STACK_I4;        \
        } while (0)
 
-
-static GList*
-g_list_prepend_mempool (GList* l, MonoMemPool* mp, gpointer datum)
-{
-       GList* n = mono_mempool_alloc (mp, sizeof (GList));
-       n->next = l;
-       n->prev = NULL;
-       n->data = datum;
-       return n;
-}
-
 static void 
 unlink_target (MonoBasicBlock *bb, MonoBasicBlock *target)
 {
@@ -640,7 +631,7 @@ analyze_dev_use (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *root, MonoInst
                                //printf ("FOUND %d\n", idx);
                                ui->bb = bb;
                                ui->inst = root;
-                               info->uses = g_list_prepend_mempool (info->uses, cfg->mempool, ui);
+                               info->uses = g_list_prepend_mempool (cfg->mempool, info->uses, ui);
                        }
                }
        }
@@ -653,7 +644,7 @@ analyze_dev_use (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *root, MonoInst
                //printf ("FOUND %d\n", idx);
                ui->bb = bb;
                ui->inst = root;
-               info->uses = g_list_prepend_mempool (info->uses, cfg->mempool, ui);
+               info->uses = g_list_prepend_mempool (cfg->mempool, info->uses, ui);
        } else {
                if (arity) {
                        //if (inst->ssa_op != MONO_SSA_STORE)
index c3e99512592ca2fda5ceea1c10753f657368529e..cca742c56dc6407caf603d7c697de0de6e2df273 100644 (file)
@@ -8,6 +8,8 @@
  */
 #include <string.h>
 #include <mono/metadata/debug-helpers.h>
+#include <mono/metadata/mempool.h>
+#include <mono/metadata/mempool-internals.h>
 
 #define NEW_IR
 #include "mini.h"
@@ -37,16 +39,6 @@ typedef struct {
        MonoInst *inst;
 } MonoVarUsageInfo;
 
-static inline GList*
-g_list_prepend_mempool (GList* l, MonoMemPool* mp, gpointer datum)
-{
-       GList* n = mono_mempool_alloc (mp, sizeof (GList));
-       n->next = l;
-       n->prev = NULL;
-       n->data = datum;
-       return n;
-}
-
 static void 
 unlink_target (MonoBasicBlock *bb, MonoBasicBlock *target)
 {
@@ -158,7 +150,7 @@ record_use (MonoCompile *cfg, MonoInst *var, MonoBasicBlock *bb, MonoInst *ins)
        
        ui->bb = bb;
        ui->inst = ins;
-       info->uses = g_list_prepend_mempool (info->uses, cfg->mempool, ui);
+       info->uses = g_list_prepend_mempool (cfg->mempool, info->uses, ui);
 }      
 
 typedef struct {
@@ -1276,7 +1268,7 @@ add_to_dce_worklist (MonoCompile *cfg, MonoMethodVar *var, MonoMethodVar *use, G
 {
        GList *tmp;
 
-       *wl = g_list_prepend_mempool (*wl, cfg->mempool, use);
+       *wl = g_list_prepend_mempool (cfg->mempool, *wl, use);
 
        for (tmp = use->uses; tmp; tmp = tmp->next) {
                MonoVarUsageInfo *ui = (MonoVarUsageInfo *)tmp->data;
@@ -1306,7 +1298,7 @@ mono_ssa_deadce2 (MonoCompile *cfg)
        work_list = NULL;
        for (i = 0; i < cfg->num_varinfo; i++) {
                MonoMethodVar *info = MONO_VARINFO (cfg, i);
-               work_list = g_list_prepend_mempool (work_list, cfg->mempool, info);
+               work_list = g_list_prepend_mempool (cfg->mempool, work_list, info);
        }
 
        while (work_list) {