import Analysis.Locality.LocalityAnalysis;
import Analysis.Locality.LocalityBinding;
import Analysis.Locality.DiscoverConflicts;
+import Analysis.Locality.DelayComputation;
import Analysis.CallGraph.CallGraph;
import Analysis.Prefetch.*;
import Analysis.Loops.WriteBarrier;
+import Analysis.Loops.GlobalFieldType;
import Analysis.Locality.TypeAnalysis;
import Analysis.MLP.MLPAnalysis;
boolean nonSESEpass=true;
WriteBarrier wb;
DiscoverConflicts dc;
+ DelayComputation delaycomp;
CallGraph callgraph;
public BuildCode(State st, Hashtable temptovar, TypeUtil typeutil, SafetyAnalysis sa, PrefetchAnalysis pa) {
this.dc=new DiscoverConflicts(locality, st, typeanalysis);
dc.doAnalysis();
}
+ if (state.SINGLETM&&state.DELAYCOMP) {
+ TypeAnalysis typeanalysis=new TypeAnalysis(locality, st, typeutil,callgraph);
+ GlobalFieldType gft=new GlobalFieldType(callgraph, st, typeutil.getMain());
+ delaycomp=new DelayComputation(locality, st, typeanalysis, gft);
+ delaycomp.doAnalysis();
+ }
+
+
if(state.MLP) {
sese2bogusFlatMeth = new Hashtable<FlatSESEEnterNode, FlatMethod>();
}
private int arraycount=0;
public boolean OPTIMIZE=false;
public boolean DCOPTS=false;
+ public boolean DELAYCOMP=false;
private Hashtable<ClassDescriptor, Hashtable<OptionalTaskDescriptor, OptionalTaskDescriptor>> optionaltaskdescriptors;
checkExpressionNode(md,nametable,aan.getIndex(),new TypeDescriptor(TypeDescriptor.INT));
TypeDescriptor ltd=left.getType();
-
if (ltd.dereference().iswrapper()) {
aan.wrappertype=((FieldDescriptor)ltd.dereference().getClassDesc().getFieldTable().get("value")).getType();
}
case Operation.GTE:
// 5.6.2 Binary Numeric Promotion
//TODO unboxing of reference objects
- if (!ltd.isNumber()||!rtd.isNumber())
- throw new Error();
+ if (!ltd.isNumber()||!rtd.isNumber()) {
+ if (!ltd.isNumber())
+ throw new Error("Leftside is not number"+on.printNode(0)+"type="+ltd.toPrettyString());
+ if (!rtd.isNumber())
+ throw new Error("Rightside is not number"+on.printNode(0));
+ }
if (ltd.isDouble()||rtd.isDouble())
lefttype=new TypeDescriptor(TypeDescriptor.DOUBLE);
state.OPTIMIZE=true;
else if (option.equals("-dcopts"))
state.DCOPTS=true;
- else if (option.equals("-raw"))
+ else if (option.equals("-delaycomp"))
+ state.DELAYCOMP=true;
+ else if (option.equals("-raw"))
state.RAW=true;
else if (option.equals("-scheduling"))
state.SCHEDULING=true;