* Removed all Id tags.
[cacao.git] / src / vm / jit / loop / loop.c
index b7a4f12497bb959d3db0e47511a669c58dc246b2..e817f02ba0dc012836bb7d64f915f5bdc9fe4986 100644 (file)
@@ -1,9 +1,9 @@
-/* vm/jit/loop/loop.c - array bound removal
+/* src/vm/jit/loop/loop.c - array bound removal
 
-   Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
-   R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
-   C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
-   Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+   J. Wenninger, Institut f. Computersprachen - TU Wien
 
    This file is part of CACAO.
 
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
 
-   Contact: cacao@complang.tuwien.ac.at
+   Contact: cacao@cacaojvm.org
 
-   Authors: Christopher Kruegel      EMAIL: cacao@complang.tuwien.ac.at
+   Authors: Christopher Kruegel
+
+   Changes: Christian Thalinger
 
    The loop detection is performed according to Lengauer-Tarjan
    algorithm that uses dominator trees (found eg. in modern compiler
    implementation by a.w. appel)
 
-   $Id: loop.c 1735 2004-12-07 14:33:27Z twisti $
 
 */
 
 
+#include <assert.h>
 /*  #include <stdio.h> */
-/*  #include <stdlib.h> */
+#include <stdlib.h>
 
 #include "mm/memory.h"
 #include "toolbox/logging.h"
@@ -289,11 +291,19 @@ void detectLoops(methodinfo *m, loopdata *ld)
    detection and set up the c_allLoops list.
 */
 
-void analyseGraph(methodinfo *m, loopdata *ld)
+void analyseGraph(jitdata *jd)
 {
-  setup(m, ld);
-  dominators(ld);
-  detectLoops(m, ld);
+       methodinfo *m;
+       loopdata   *ld;
+
+       /* get required compiler data */
+
+       m  = jd->m;
+       ld = jd->ld;
+
+       setup(m, ld);
+       dominators(ld);
+       detectLoops(m, ld);
 }
 
 
@@ -332,7 +342,8 @@ void resultPass2(loopdata *ld)
 
 void c_mem_error()
 {
-  panic("C_ERROR: Not enough memeory");
+       log_text("C_ERROR: Not enough memeory");
+       assert(0);
 }