llvm.org GIT mirror llvm / c78022e
Enable JIT when the platform supports it. 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 John Criswell 17 years ago
6 changed file(s) with 111 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
59825982 AC_TRY_COMPILE([#include
59835983 #ifdef HAVE_NAMESPACES
59845984 using namespace std;
5985 #endif],[bidirectional_iterator,int> t; return 0;],
5985 #endif],[bidirectional_iterator> t; return 0;],
59865986 ac_cv_cxx_have_bi_iterator=yes, ac_cv_cxx_have_bi_iterator=no)
59875987 AC_LANG_RESTORE
59885988 ])
59925992 ])
59935993
59945994 #
5995 # Check for standard iterator extension. This is modified from
5995 # Check for forward iterator extension. This is modified from
59965996 # http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
59975997 #
59985998 AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR],
60046004 AC_TRY_COMPILE([#include
60056005 #ifdef HAVE_NAMESPACES
60066006 using namespace std;
6007 #endif],[forward_iterator,int> t; return 0;],
6007 #endif],[forward_iterator> t; return 0;],
60086008 ac_cv_cxx_have_fwd_iterator=yes, ac_cv_cxx_have_fwd_iterator=no)
60096009 AC_LANG_RESTORE
60106010 ])
271271 fi
272272
273273 dnl JIT Option
274 AC_ARG_ENABLE(jit,AC_HELP_STRING([--enable-jit],[Enable Just In Time Compiling (default is NO)]),,enableval=no)
274 AC_ARG_ENABLE(jit,AC_HELP_STRING([--enable-jit],[Enable Just In Time Compiling (default is YES)]),,enableval=default)
275275
276276 if test ${enableval} = "no"
277277 then
278278 AC_SUBST(JIT,[[]])
279279 else
280 AC_SUBST(JIT,[[TARGET_HAS_JIT=1]])
280 case $target in
281 *i*86*)
282 AC_SUBST(JIT,[[TARGET_HAS_JIT=1]])
283 ;;
284 *sparc*)
285 AC_SUBST(JIT,[[TARGET_HAS_JIT=1]])
286 ;;
287 *)
288 AC_SUBST(JIT,[[]])
289 ;;
290 esac
281291 fi
282292
283293 dnl **************************************************************************
284294 dnl * Set the location of various third-party software packages
285295 dnl **************************************************************************
296
297 dnl Location of SPEC benchmarks
286298 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]))
299
300 dnl Location of the LLVM C front end
287301 AC_ARG_WITH(llvmgccdir,AC_HELP_STRING([--with-llvmgccdir],[Location of LLVM GCC front-end]),AC_SUBST(LLVMGCCDIR,[$withval]))
302
303 dnl Location of the bytecode repository
288304 AC_ARG_WITH(bcrepos,AC_HELP_STRING([--with-bcrepos],[Location of Bytecode Repository]),AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms]))
305
306 dnl Location of PAPI
289307 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]))
290 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,[.]))
308
309 dnl Location of the purify program
291310 AC_ARG_WITH(purify,AC_HELP_STRING([--with-purify],[Location of purify program]),AC_SUBST(PURIFY,[$withval]))
292311
312 dnl Location for placing object files and built programs, libraries, etc
313 if test -d /localhome
314 then
315 AC_SUBST(OBJROOT,[/localhome/$USER])
316 else
317 AC_SUBST(OBJROOT,[.])
318 fi
319
320 AC_ARG_WITH(objroot,AC_HELP_STRING([--with-objroot],[Location where object files should be placed (default is .)]),AC_SUBST(OBJROOT,[$withval]))
321
322 dnl **************************************************************************
323 dnl * Create the output files
324 dnl **************************************************************************
293325 AC_OUTPUT(Makefile.config)
10341034 --enable-precompiled_bytecode
10351035 Use pre-compiled bytecode (default is NO)
10361036 --enable-llc_diffs Enable LLC Diffs when testing (default is YES)
1037 --enable-jit Enable Just In Time Compiling (default is NO)
1037 --enable-jit Enable Just In Time Compiling (default is YES)
10381038
10391039 Optional Packages:
10401040 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
10481048 --with-llvmgccdir Location of LLVM GCC front-end
10491049 --with-bcrepos Location of Bytecode Repository
10501050 --with-papi Location of PAPI
1051 --with-purify Location of purify program
10511052 --with-objroot Location where object files should be placed
10521053 (default is .)
1053 --with-purify Location of purify program
10541054
10551055 Some influential environment variables:
10561056 CXX C++ compiler command
2047520475 int
2047620476 main ()
2047720477 {
20478 bidirectional_iterator,int> t; return 0;
20478 bidirectional_iterator> t; return 0;
2047920479 ;
2048020480 return 0;
2048120481 }
2054620546 int
2054720547 main ()
2054820548 {
20549 forward_iterator,int> t; return 0;
20549 forward_iterator> t; return 0;
2055020550 ;
2055120551 return 0;
2055220552 }
2200422004 enableval="$enable_jit"
2200522005
2200622006 else
22007 enableval=no
22007 enableval=default
2200822008 fi;
2200922009
2201022010 if test ${enableval} = "no"
2201222012 JIT=
2201322013
2201422014 else
22015 JIT=TARGET_HAS_JIT=1
22016
22017 fi
22015 case $target in
22016 *i*86*)
22017 JIT=TARGET_HAS_JIT=1
22018
22019 ;;
22020 *sparc*)
22021 JIT=TARGET_HAS_JIT=1
22022
22023 ;;
22024 *)
22025 JIT=
22026
22027 ;;
22028 esac
22029 fi
22030
2201822031
2201922032
2202022033 # Check whether --with-spec or --without-spec was given.
2202722040
2202822041 fi;
2202922042
22043
2203022044 # Check whether --with-llvmgccdir or --without-llvmgccdir was given.
2203122045 if test "${with_llvmgccdir+set}" = set; then
2203222046 withval="$with_llvmgccdir"
2203422048
2203522049 fi;
2203622050
22051
2203722052 # Check whether --with-bcrepos or --without-bcrepos was given.
2203822053 if test "${with_bcrepos+set}" = set; then
2203922054 withval="$with_bcrepos"
2204422059
2204522060 fi;
2204622061
22062
2204722063 # Check whether --with-papi or --without-papi was given.
2204822064 if test "${with_papi+set}" = set; then
2204922065 withval="$with_papi"
2205422070
2205522071 fi;
2205622072
22073
22074 # Check whether --with-purify or --without-purify was given.
22075 if test "${with_purify+set}" = set; then
22076 withval="$with_purify"
22077 PURIFY=$withval
22078
22079 fi;
22080
22081 if test -d /localhome
22082 then
22083 OBJROOT=/localhome/$USER
22084
22085 else
22086 OBJROOT=.
22087
22088 fi
22089
22090
2205722091 # Check whether --with-objroot or --without-objroot was given.
2205822092 if test "${with_objroot+set}" = set; then
2205922093 withval="$with_objroot"
2206022094 OBJROOT=$withval
22061
22062 else
22063 OBJROOT=.
22064
22065 fi;
22066
22067 # Check whether --with-purify or --without-purify was given.
22068 if test "${with_purify+set}" = set; then
22069 withval="$with_purify"
22070 PURIFY=$withval
2207122095
2207222096 fi;
2207322097
184184
185185 /* Indicates whether we have STL iterators */
186186 #undef HAVE_STD_ITERATOR
187 #undef HAVE_BI_ITERATOR
188 #undef HAVE_FWD_ITERATOR
187189
188190 /* Indicates which slist we should use */
189191 #undef HAVE_EXT_SLIST
2222
2323 #include
2424
25 //////////////////////////////////////////////////////////////////////////////
26 // If the bidirectional iterator is not defined, attempt to define it using
27 // the C++ standard iterator.
28 //////////////////////////////////////////////////////////////////////////////
29 #ifndef HAVE_BI_ITERATOR
2530 #ifdef HAVE_STD_ITERATOR
2631
2732 // Define stupid wrappers around std::iterator...
3035 : public std::iterator {
3136 };
3237
33 template
34 struct forward_iterator
35 : public std::iterator {
36 };
38 #else
39 #error "Need to have standard iterator to define bidirectional iterator!"
40 #endif
3741
3842 #else
3943
4044 // Just use bidirectional_iterator directly.
4145 using std::bidirectional_iterator;
46
47 #endif
48
49 //////////////////////////////////////////////////////////////////////////////
50 // If the forward iterator is not defined, attempt to define it using the
51 // C++ standard iterator.
52 //////////////////////////////////////////////////////////////////////////////
53 #ifndef HAVE_FWD_ITERATOR
54 #ifdef HAVE_STD_ITERATOR
55 template
56 struct forward_iterator
57 : public std::iterator {
58 };
59 #else
60 #error "Need to have standard iterator to define forward iterator!"
61 #endif
62 #else
63 // Just use forward iterator directly.
4264 using std::forward_iterator;
4365 #endif
4466
67
4568 #endif
184184
185185 /* Indicates whether we have STL iterators */
186186 #undef HAVE_STD_ITERATOR
187 #undef HAVE_BI_ITERATOR
188 #undef HAVE_FWD_ITERATOR
187189
188190 /* Indicates which slist we should use */
189191 #undef HAVE_EXT_SLIST