-/* jit/loop/loop.c - array bound removal
+/* src/vm/jit/loop/loop.c - array bound removal
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
- M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
- P. Tomsich, J. Wenninger
+ 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 1454 2004-11-05 14:19:32Z twisti $
*/
-#include <stdio.h>
+#include <assert.h>
+/* #include <stdio.h> */
#include <stdlib.h>
-#include "global.h"
-#include "jit/jit.h"
-#include "jit/loop/loop.h"
-#include "jit/loop/graph.h"
-#include "jit/loop/tracing.h"
-#include "toolbox/logging.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
+#include "toolbox/logging.h"
+#include "vm/global.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/loop/loop.h"
+#include "vm/jit/loop/graph.h"
+#include "vm/jit/loop/tracing.h"
/*
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);
}
void c_mem_error()
{
- panic("C_ERROR: Not enough memeory");
+ log_text("C_ERROR: Not enough memeory");
+ assert(0);
}