remove Input file related stuff from the compiler and runtime system
[IRC.git] / Robust / src / buildscript
index 2483ac8e81a8e9eef26e35ba38567086e19c023a..e1b2566dc1f407e1349abe50116975a414926a80 100755 (executable)
@@ -51,7 +51,7 @@ echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
 echo -disjoint-desire-determinism set above interproc for determinism
 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
 echo -disjoint-count-visits for counting visits in the fixed point algorithm to evaluate convergence behavior
-echo -disjoint-count-graph-elements nodes, edges and states in final graph for main method context
+echo -disjoint-count-graph-elements FILE nodes, edges and states in final graph for main method context
 echo
 echo -do-definite-reach-analysis enable improved precision for disjoint reachability analysis
 echo -disjoint-disable-global-sweep
@@ -94,6 +94,8 @@ echo -accurateprofile build with accurate profile information including pre/post
 echo -profile_interrupt build with profile information of interrupts
 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
 echo -gccachecoherent turns on the cache coherence during gc
+echo -inputfile enables reading input files in Tilera
+echo -inputfilecompress enables the compressed version of input files
 echo
 echo Multicore GC options
 echo -perfcount performance counters
@@ -125,6 +127,7 @@ echo
 echo SSJava options
 echo -ssjava enables SSJava
 echo -ssjavadebug reports interim results
+echo -ssjavainfer location type inference
 echo -ssjava-induce-error N S where 1/N is the probability to error at any deref or divide and S is a random seed
 echo
 echo Other options
@@ -274,6 +277,9 @@ TILERA_PAGE_SIZE="0x10000"
 TILERA_PAGE_SIZE_BITS="16"
 TILERA_NUM_BLOCKS="20"
 TILERA_NUM_PAGES_PER_BLOCK="16"
+INPUTFILEFLAG=false
+INPUTFILES=''
+INPUTFILEOPTS=''
 GCCACHECOHERENTFLAG=false
 COMPILER_HEAP_SIZE="1500"
 
@@ -611,6 +617,14 @@ elif [[ $1 = '-mgc' ]]
 then
 MGCFLAG=true
 JAVAOPTS="$JAVAOPTS -mgc"
+elif [[ $1 = '-inputfile' ]]
+then
+INPUTFILEFLAG=true
+INPUTFILES="$INPUTFILES $2"
+shift
+elif [[ $1 = '-inputfilecompress' ]]
+then
+INPUTFILEOPTS="$INPUTFILEOPTS -compress"
 elif [[ $1 = '-mgcintel' ]]
 then
 MGCINTELFLAG=true
@@ -682,6 +696,10 @@ elif [[ $1 = '-ssjavadebug' ]]
 then
 JAVAOPTS="$JAVAOPTS -ssjavadebug"
 
+elif [[ $1 = '-ssjavainfer' ]]
+then
+JAVAOPTS="$JAVAOPTS -ssjavainfer"
+
 elif [[ $1 = '-ssjava-inject-error' ]]
 then
 USE_SSJAVA_CLASSPATH=true
@@ -966,6 +984,17 @@ else
   fi
 fi
 
+# transfer the input files
+
+if $INPUTFILEFLAG
+then
+./ourjavac -cp ../cup:.:$(CLASSPATH) ${ROBUSTROOT}/Tilera/Benchmarks/GC/galois/InputFileTranslator.java
+if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx${COMPILER_HEAP_SIZE}m -classpath $ROBUSTROOT/Tilera/Benchmarks/GC/galois InputFileTranslator \
+       -dir $BUILDDIR $INPUTFILEOPTS $INPUTFILES
+    then exit $?
+fi
+fi
+
 # after executing Main, if -justanalyze flag, just exit
 if $EXITAFTERANALYSIS
 then
@@ -1108,6 +1137,11 @@ else
 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
 fi
 
+if $INPUTFILEFLAG
+then
+TILERACFLAGS="${TILERACFLAGS} -DINPUTFILE"
+fi
+
 if $GCTBLDEBUGFLAG
 then
 TILERACFLAGS="${TILERACFLAGS} -DGC_TBL_DEBUG"