MAINCLASS=MatrixMultiply
SRC=${MAINCLASS}.java
-FLAGS=-dsm -prefetch -nooptimize -profile -debug -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -o ${MAINCLASS}
+FLAGS=-dsm -prefetch -nooptimize -printflat -profile -debug -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -o ${MAINCLASS}
default:
../../../buildscript ${FLAGS} ${SRC}
clean:
/***** Generate code for FlatMethod fm. *****/
private void generateFlatMethod(FlatMethod fm, LocalityBinding lb, PrintWriter output) {
+ if (State.PRINTFLAT)
+ System.out.println(fm.printMethod());
MethodDescriptor md=fm.getMethod();
TaskDescriptor task=fm.getTask();
}
public String toString() {
- return "prefetchnode";
+ String st="prefetch(";
+ boolean first=true;
+ for(Iterator<PrefetchPair> it=hspp.iterator();it.hasNext();) {
+ PrefetchPair pp=it.next();
+ if (!first)
+ st+=", ";
+ first=false;
+ st+=pp;
+ }
+ return st+")";
}
public int kind() {
public boolean THREAD=false;
public boolean CONSCHECK=false;
public boolean INSTRUCTIONFAILURE=false;
+ public static boolean PRINTFLAT=false;
public String structfile;
public String main;
ClassLibraryPrefix=args[++i]+"/";
else if (option.equals("-mainclass"))
state.main=args[++i];
+ else if (option.equals("-printflat"))
+ State.PRINTFLAT=true;
else if (option.equals("-struct"))
state.structfile=args[++i];
else if (option.equals("-conscheck"))
System.out.println("-conscheck -- turn on consistency checking");
System.out.println("-task -- compiler for tasks");
System.out.println("-thread -- threads");
+ System.out.println("-printflat -- print out flat representation");
System.out.println("-instructionfailures -- insert code for instruction level failures");
System.out.println("-taskstate -- do task state analysis");
System.out.println("-flatirtasks -- create dot files for flat IR graphs of tasks");
echo -dmalloc link in dmalloc
echo -recover compile task code
echo -specdir directory
+echo -printflat print out flat representation
echo -selfloop task - this task cannot self loop forever
echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
echo -taskstate do task state analysis
elif [[ $1 = '-prefetch' ]]
then
JAVAOPTS="$JAVAOPTS -prefetch"
+elif [[ $1 = '-printflat' ]]
+then
+JAVAOPTS="$JAVAOPTS -printflat"
elif [[ $1 = '-mac' ]]
then
EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"