# HG changeset patch # User Thomas Wuerthinger # Date 1305115944 -7200 # Node ID d1c5a798b73ca34c86f6e62e907f28cb16cfec9d # Parent 9e30cf6dcf962a5a249e014bf89796f569b10db4 Removed memory map. diff -r 9e30cf6dcf96 -r d1c5a798b73c graal/GraalCompiler/src/com/sun/c1x/C1XOptions.java --- a/graal/GraalCompiler/src/com/sun/c1x/C1XOptions.java Wed May 11 14:02:08 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/C1XOptions.java Wed May 11 14:12:24 2011 +0200 @@ -88,7 +88,6 @@ // all optimization settings public static boolean OptLocalValueNumbering; - public static boolean OptLocalLoadElimination; public static boolean OptCSEArrayLength; public static boolean OptBlockSkipping; public static boolean OptControlFlow; @@ -152,7 +151,6 @@ // Level 1 optimizations OptLocalValueNumbering = l; - OptLocalLoadElimination = l; PhiLoopStores = l; OptControlFlow = l; diff -r 9e30cf6dcf96 -r d1c5a798b73c graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java --- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Wed May 11 14:02:08 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Wed May 11 14:12:24 2011 +0200 @@ -87,11 +87,6 @@ */ private final ValueMap localValueMap; - /** - * Map used for local load elimination (i.e. within the current block). - */ - private final MemoryMap memoryMap; - private final BytecodeStream stream; // the bytecode stream // bci-to-block mapping private BlockMap blockMap; @@ -133,7 +128,6 @@ this.compilation = compilation; this.ir = ir; this.stats = compilation.stats; - this.memoryMap = C1XOptions.OptLocalLoadElimination ? new MemoryMap() : null; this.localValueMap = C1XOptions.OptLocalValueNumbering ? new ValueMap() : null; log = C1XOptions.TraceBytecodeParserLevel > 0 ? new LogStream(TTY.out()) : null; stream = new BytecodeStream(compilation.method.code()); @@ -378,9 +372,6 @@ } StoreIndexed result = new StoreIndexed(array, index, length, kind, value, graph); append(result); - if (memoryMap != null) { - memoryMap.storeValue(value); - } } void stackOp(int opcode) { @@ -593,9 +584,6 @@ stateBefore = frameState.create(bci()); } NewInstance n = new NewInstance(type, cpi, constantPool(), graph); - if (memoryMap != null) { - memoryMap.newInstance(n); - } n.setStateBefore(stateBefore); frameState.apush(append(n)); } @@ -702,31 +690,12 @@ } private void appendOptimizedStoreField(StoreField store) { - if (memoryMap != null) { - StoreField previous = memoryMap.store(store); - if (previous == null) { - // the store is redundant, do not append - return; - } - } append(store); } private void appendOptimizedLoadField(CiKind kind, LoadField load) { - if (memoryMap != null) { - Value replacement = memoryMap.load(load); - if (replacement != load) { - // the memory buffer found a replacement for this load (no need to append) - frameState.push(kind.stackKind(), replacement); - return; - } - } // append the load to the instruction Value optimized = append(load); - if (memoryMap != null && optimized != load) { - // local optimization happened, replace its value in the memory map - memoryMap.setResult(load, optimized); - } frameState.push(kind.stackKind(), optimized); } @@ -1131,11 +1100,6 @@ throw new CiBailout("Method and/or inlining is too large"); } - if (memoryMap != null && hasUncontrollableSideEffects(x)) { - // conservatively kill all memory if there are unknown side effects - memoryMap.kill(); - } - if (x.canTrap()) { // connect the instruction to any exception handlers x.setExceptionHandlers(handleException(x, bci)); @@ -1555,9 +1519,6 @@ if (localValueMap != null) { localValueMap.killAll(); } - if (memoryMap != null) { - memoryMap.kill(); - } } boolean assumeLeafClass(RiType type) {