GNU header update.
[cacao.git] / src / vm / jit / jit.c
index 13195465291debf01886b588ff3b169c3682eddf..f27f52ee99614c42d5920daf31440a0f0295205f 100644 (file)
@@ -1,9 +1,9 @@
-/* jit/jit.c - calls the code generation functions
+/* vm/jit/jit.c - calls the code generation functions
 
-   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 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.
 
 
    Changes: Edwin Steiner
 
-   $Id: jit.c 1530 2004-11-17 20:43:28Z christian $
+   $Id: jit.c 1735 2004-12-07 14:33:27Z twisti $
 
 */
 
 
-#include <stdlib.h>
-#include <string.h>
-#include "global.h"
-#include "tables.h"
-#include "loader.h"
-#include "builtin.h"
-#include "native.h"
-#include "asmpart.h"
 #include "codegen.h"
-#include "types.h"
-#include "options.h"
-#include "statistics.h"
-#include "jit/codegen.inc.h"
-#include "jit/inline.h"
-#include "jit/jit.h"
-#include "jit/parseRT.h"
-#include "jit/parse.h"
-#include "jit/stack.h"
-#include "jit/reg.h"
-#include "jit/typecheck.h"
-#include "threads/thread.h"
 #include "disass.h"
-#include "loop/loop.h"
-#include "loop/graph.h"
-#include "loop/analyze.h"
-#include "toolbox/logging.h"
-#include "toolbox/memory.h"
 #include "types.h"
-#include <stdio.h>
+#include "mm/memory.h"
+#include "toolbox/logging.h"
+#include "vm/builtin.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
+#include "vm/jit/codegen.inc.h"
+#include "vm/jit/jit.h"
+#ifdef LSRA
+#include "vm/jit/lsra.h"
+#endif
+#include "vm/jit/parse.h"
+#include "vm/jit/reg.h"
+#include "vm/jit/stack.h"
+#include "vm/jit/inline/inline.h"
+#include "vm/jit/inline/parseRT.h"
+#include "vm/jit/loop/analyze.h"
+#include "vm/jit/loop/graph.h"
+#include "vm/jit/loop/loop.h"
+#include "vm/jit/verify/typecheck.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
+
 
 /* global switches ************************************************************/
 
@@ -1601,7 +1607,12 @@ static functionptr jit_compile_intern(methodinfo *m, codegendata *cd,
                log_message_method("Allocating registers: ", m);
 
        /* allocate registers */
-       regalloc(m, cd, rd);
+#ifdef LSRA
+       if (opt_lsra)
+               lsra(m, cd, rd, ld, id);
+       else
+#endif
+               regalloc(m, cd, rd);
 
        if (compileverbose) {
                log_message_method("Allocating registers done: ", m);