Enable JIT when the platform supports it.
authorJohn Criswell <criswell@uiuc.edu>
Tue, 29 Jul 2003 19:11:58 +0000 (19:11 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Tue, 29 Jul 2003 19:11:58 +0000 (19:11 +0000)
Select /localhome/$USER when it exists.
Fix the checks for bidirectional and forward iterators so that they work with
version of GCC prior to 3.x.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7383 91177308-0d34-0410-b5e6-96231b3b80d8

autoconf/aclocal.m4
autoconf/configure.ac
configure
include/Config/config.h.in
include/Support/iterator
include/llvm/Config/config.h.in

index f5ea270c12475d5ab60f227adaba3ffc46e11ef4..f25fea8e7e0dfd60996d8d24f928079f044e1002 100644 (file)
@@ -5983,7 +5983,7 @@ ac_cv_cxx_have_bi_iterator,
   AC_TRY_COMPILE([#include <iterator>
 #ifdef HAVE_NAMESPACES
 using namespace std;
-#endif],[bidirectional_iterator<int,int,int> t; return 0;],
+#endif],[bidirectional_iterator<int,int> t; return 0;],
   ac_cv_cxx_have_bi_iterator=yes, ac_cv_cxx_have_bi_iterator=no)
   AC_LANG_RESTORE
 ])
@@ -5993,7 +5993,7 @@ fi
 ])
 
 #
-# Check for standard iterator extension.  This is modified from
+# Check for forward iterator extension.  This is modified from
 # http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
 #
 AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR],
@@ -6005,7 +6005,7 @@ ac_cv_cxx_have_fwd_iterator,
   AC_TRY_COMPILE([#include <iterator>
 #ifdef HAVE_NAMESPACES
 using namespace std;
-#endif],[forward_iterator<int,int,int> t; return 0;],
+#endif],[forward_iterator<int,int> t; return 0;],
   ac_cv_cxx_have_fwd_iterator=yes, ac_cv_cxx_have_fwd_iterator=no)
   AC_LANG_RESTORE
 ])
index ed7f057f36dbd36208d64e70cb05ff2b63fd55b7..19e18b2c1bf2d748ceee17f36a2be829644a3199 100644 (file)
@@ -272,23 +272,55 @@ else
 fi
 
 dnl JIT Option
-AC_ARG_ENABLE(jit,AC_HELP_STRING([--enable-jit],[Enable Just In Time Compiling (default is NO)]),,enableval=no)
+AC_ARG_ENABLE(jit,AC_HELP_STRING([--enable-jit],[Enable Just In Time Compiling (default is YES)]),,enableval=default)
 
 if test ${enableval} = "no"
 then
        AC_SUBST(JIT,[[]])
 else
-       AC_SUBST(JIT,[[TARGET_HAS_JIT=1]])
+       case $target in
+               *i*86*)
+                       AC_SUBST(JIT,[[TARGET_HAS_JIT=1]])
+                       ;;
+               *sparc*)
+                       AC_SUBST(JIT,[[TARGET_HAS_JIT=1]])
+                       ;;
+               *)
+                       AC_SUBST(JIT,[[]])
+                       ;;
+       esac
 fi
 
 dnl **************************************************************************
 dnl * Set the location of various third-party software packages
 dnl **************************************************************************
+
+dnl Location of SPEC benchmarks
 AC_ARG_WITH(spec,AC_HELP_STRING([--with-spec],[Location of SPEC benchmarks]),AC_SUBST(SPEC_ROOT,[$withval]),AC_SUBST(SPEC_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec]))
+
+dnl Location of the LLVM C front end
 AC_ARG_WITH(llvmgccdir,AC_HELP_STRING([--with-llvmgccdir],[Location of LLVM GCC front-end]),AC_SUBST(LLVMGCCDIR,[$withval]))
+
+dnl Location of the bytecode repository
 AC_ARG_WITH(bcrepos,AC_HELP_STRING([--with-bcrepos],[Location of Bytecode Repository]),AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms]))
+
+dnl Location of PAPI
 AC_ARG_WITH(papi,AC_HELP_STRING([--with-papi],[Location of PAPI]),AC_SUBST(PAPIDIR,[$withval]),AC_SUBST(PAPIDIR,[/home/vadve/shared/papi-2.3.4.1]))
-AC_ARG_WITH(objroot,AC_HELP_STRING([--with-objroot],[Location where object files should be placed (default is .)]),AC_SUBST(OBJROOT,[$withval]),AC_SUBST(OBJROOT,[.]))
+
+dnl Location of the purify program
 AC_ARG_WITH(purify,AC_HELP_STRING([--with-purify],[Location of purify program]),AC_SUBST(PURIFY,[$withval]))
 
+dnl Location for placing object files and built programs, libraries, etc
+if test -d /localhome
+then
+       AC_SUBST(OBJROOT,[/localhome/$USER])
+else
+       AC_SUBST(OBJROOT,[.])
+fi
+
+AC_ARG_WITH(objroot,AC_HELP_STRING([--with-objroot],[Location where object files should be placed (default is .)]),AC_SUBST(OBJROOT,[$withval]))
+
+dnl **************************************************************************
+dnl * Create the output files
+dnl **************************************************************************
 AC_OUTPUT(Makefile.config)
index fad8e24a8a736e9633424ddc3e8fd425687904d4..ec697bec0ee96923315a313c1c456dc2d41f87f0 100755 (executable)
--- a/configure
+++ b/configure
@@ -1035,7 +1035,7 @@ Optional Features:
   --enable-precompiled_bytecode
                           Use pre-compiled bytecode (default is NO)
   --enable-llc_diffs      Enable LLC Diffs when testing (default is YES)
-  --enable-jit            Enable Just In Time Compiling (default is NO)
+  --enable-jit            Enable Just In Time Compiling (default is YES)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1049,9 +1049,9 @@ Optional Packages:
   --with-llvmgccdir       Location of LLVM GCC front-end
   --with-bcrepos          Location of Bytecode Repository
   --with-papi             Location of PAPI
+  --with-purify           Location of purify program
   --with-objroot          Location where object files should be placed
                           (default is .)
-  --with-purify           Location of purify program
 
 Some influential environment variables:
   CXX         C++ compiler command
@@ -20476,7 +20476,7 @@ using namespace std;
 int
 main ()
 {
-bidirectional_iterator<int,int,int> t; return 0;
+bidirectional_iterator<int,int> t; return 0;
   ;
   return 0;
 }
@@ -20547,7 +20547,7 @@ using namespace std;
 int
 main ()
 {
-forward_iterator<int,int,int> t; return 0;
+forward_iterator<int,int> t; return 0;
   ;
   return 0;
 }
@@ -22005,7 +22005,7 @@ if test "${enable_jit+set}" = set; then
   enableval="$enable_jit"
 
 else
-  enableval=no
+  enableval=default
 fi;
 
 if test ${enableval} = "no"
@@ -22013,11 +22013,24 @@ then
        JIT=
 
 else
-       JIT=TARGET_HAS_JIT=1
+       case $target in
+               *i*86*)
+                       JIT=TARGET_HAS_JIT=1
+
+                       ;;
+               *sparc*)
+                       JIT=TARGET_HAS_JIT=1
 
+                       ;;
+               *)
+                       JIT=
+
+                       ;;
+       esac
 fi
 
 
+
 # Check whether --with-spec or --without-spec was given.
 if test "${with_spec+set}" = set; then
   withval="$with_spec"
@@ -22028,6 +22041,7 @@ else
 
 fi;
 
+
 # Check whether --with-llvmgccdir or --without-llvmgccdir was given.
 if test "${with_llvmgccdir+set}" = set; then
   withval="$with_llvmgccdir"
@@ -22035,6 +22049,7 @@ if test "${with_llvmgccdir+set}" = set; then
 
 fi;
 
+
 # Check whether --with-bcrepos or --without-bcrepos was given.
 if test "${with_bcrepos+set}" = set; then
   withval="$with_bcrepos"
@@ -22045,6 +22060,7 @@ else
 
 fi;
 
+
 # Check whether --with-papi or --without-papi was given.
 if test "${with_papi+set}" = set; then
   withval="$with_papi"
@@ -22055,21 +22071,29 @@ else
 
 fi;
 
-# Check whether --with-objroot or --without-objroot was given.
-if test "${with_objroot+set}" = set; then
-  withval="$with_objroot"
-  OBJROOT=$withval
-
-else
-  OBJROOT=.
-
-fi;
 
 # Check whether --with-purify or --without-purify was given.
 if test "${with_purify+set}" = set; then
   withval="$with_purify"
   PURIFY=$withval
 
+fi;
+
+if test -d /localhome
+then
+       OBJROOT=/localhome/$USER
+
+else
+       OBJROOT=.
+
+fi
+
+
+# Check whether --with-objroot or --without-objroot was given.
+if test "${with_objroot+set}" = set; then
+  withval="$with_objroot"
+  OBJROOT=$withval
+
 fi;
 
           ac_config_files="$ac_config_files Makefile.config"
index fd1c8106c117625c12ae92e5ce498a10c975d2c6..bc90611d02758d1b48717f5459a904d14b7ce62e 100644 (file)
 
 /* Indicates whether we have STL iterators */
 #undef HAVE_STD_ITERATOR
+#undef HAVE_BI_ITERATOR
+#undef HAVE_FWD_ITERATOR
 
 /* Indicates which slist we should use */
 #undef HAVE_EXT_SLIST
index d0c7b511f04db713b90af3319d64a9a81f0ee18f..96ea7781ce2bdfe1ec99c03526b1da6035ae4c10 100644 (file)
 
 #include <iterator>
 
+//////////////////////////////////////////////////////////////////////////////
+// If the bidirectional iterator is not defined, attempt to define it using
+// the C++ standard iterator.
+//////////////////////////////////////////////////////////////////////////////
+#ifndef HAVE_BI_ITERATOR
 #ifdef HAVE_STD_ITERATOR
 
 // Define stupid wrappers around std::iterator...
@@ -31,16 +36,34 @@ struct bidirectional_iterator
   : public std::iterator<std::bidirectional_iterator_tag, Ty, PtrDiffTy> {
 };
 
-template<class Ty, class PtrDiffTy>
-struct forward_iterator
-  : public std::iterator<std::forward_iterator_tag, Ty, PtrDiffTy> {
-};
+#else
+#error "Need to have standard iterator to define bidirectional iterator!"
+#endif
 
 #else
 
 // Just use bidirectional_iterator directly.
 using std::bidirectional_iterator;
+
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// If the forward iterator is not defined, attempt to define it using the
+// C++ standard iterator.
+//////////////////////////////////////////////////////////////////////////////
+#ifndef HAVE_FWD_ITERATOR
+#ifdef HAVE_STD_ITERATOR
+template<class Ty, class PtrDiffTy>
+struct forward_iterator
+  : public std::iterator<std::forward_iterator_tag, Ty, PtrDiffTy> {
+};
+#else
+#error "Need to have standard iterator to define forward iterator!"
+#endif
+#else
+// Just use forward iterator directly.
 using std::forward_iterator;
 #endif
 
+
 #endif
index fd1c8106c117625c12ae92e5ce498a10c975d2c6..bc90611d02758d1b48717f5459a904d14b7ce62e 100644 (file)
 
 /* Indicates whether we have STL iterators */
 #undef HAVE_STD_ITERATOR
+#undef HAVE_BI_ITERATOR
+#undef HAVE_FWD_ITERATOR
 
 /* Indicates which slist we should use */
 #undef HAVE_EXT_SLIST