comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2731:a2f62de90c76

Removed unused optimization settings. Removed unused imports.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Thu, 19 May 2011 17:20:55 +0200
parents e2d20fc3760f
children 2ef23785ca93
comparison
equal deleted inserted replaced
2729:108adba3345e 2731:a2f62de90c76
35 import com.sun.c1x.util.*; 35 import com.sun.c1x.util.*;
36 import com.sun.c1x.value.*; 36 import com.sun.c1x.value.*;
37 import com.sun.cri.bytecode.*; 37 import com.sun.cri.bytecode.*;
38 import com.sun.cri.ci.*; 38 import com.sun.cri.ci.*;
39 import com.sun.cri.ri.*; 39 import com.sun.cri.ri.*;
40 import com.sun.cri.ri.RiType.Representation; 40 import com.sun.cri.ri.RiType.*;
41 41
42 /** 42 /**
43 * The {@code GraphBuilder} class parses the bytecode of a method and builds the IR graph. 43 * The {@code GraphBuilder} class parses the bytecode of a method and builds the IR graph.
44 * A number of optimizations may be performed during parsing of the bytecode, including value 44 * A number of optimizations may be performed during parsing of the bytecode, including value
45 * numbering, inlining, constant folding, strength reduction, etc. 45 * numbering, inlining, constant folding, strength reduction, etc.
391 dispatch.setException(mergedState.stackAt(0)); 391 dispatch.setException(mergedState.stackAt(0));
392 dispatch.catchSuccessor().setStateBefore(mergedState.duplicate(bci)); 392 dispatch.catchSuccessor().setStateBefore(mergedState.duplicate(bci));
393 updateDispatchChain(dispatch.otherSuccessor(), mergedState, bci); 393 updateDispatchChain(dispatch.otherSuccessor(), mergedState, bci);
394 } else if (dispatchEntry.next() instanceof Deoptimize) { 394 } else if (dispatchEntry.next() instanceof Deoptimize) {
395 // deoptimizing handler 395 // deoptimizing handler
396 Deoptimize deopt = (Deoptimize) dispatchEntry.next();
397 //deopt.setStateBefore(mergedState.duplicate(bci));
398 dispatchEntry.end().setStateAfter(mergedState.duplicate(bci)); 396 dispatchEntry.end().setStateAfter(mergedState.duplicate(bci));
399 updateDispatchChain(dispatchEntry.end().blockSuccessor(0), mergedState, bci); 397 updateDispatchChain(dispatchEntry.end().blockSuccessor(0), mergedState, bci);
400 } else if (dispatchEntry.next() instanceof Unwind) { 398 } else if (dispatchEntry.next() instanceof Unwind) {
401 // unwind handler 399 // unwind handler
402 Unwind unwind = (Unwind) dispatchEntry.next(); 400 Unwind unwind = (Unwind) dispatchEntry.next();
876 exact = declared == null || !declared.isResolved() ? null : declared.exactType(); 874 exact = declared == null || !declared.isResolved() ? null : declared.exactType();
877 } 875 }
878 } 876 }
879 } 877 }
880 return exact; 878 return exact;
881 }
882
883 private RiType getAssumedLeafType(RiType type) {
884 if (isFinal(type.accessFlags())) {
885 return type;
886 }
887 RiType assumed = null;
888 if (C1XOptions.UseAssumptions) {
889 assumed = type.uniqueConcreteSubtype();
890 if (assumed != null) {
891 if (C1XOptions.PrintAssumptions) {
892 TTY.println("Recording concrete subtype assumption in context of " + type.name() + ": " + assumed.name());
893 }
894 compilation.assumptions.recordConcreteSubtype(type, assumed);
895 }
896 }
897 return assumed;
898 } 879 }
899 880
900 private void callRegisterFinalizer() { 881 private void callRegisterFinalizer() {
901 Value receiver = frameState.loadLocal(0); 882 Value receiver = frameState.loadLocal(0);
902 RiType declaredType = receiver.declaredType(); 883 RiType declaredType = receiver.declaredType();