changeset 2641:d1c5a798b73c

Removed memory map.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 11 May 2011 14:12:24 +0200
parents 9e30cf6dcf96
children 8932f1027050
files graal/GraalCompiler/src/com/sun/c1x/C1XOptions.java graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java
diffstat 2 files changed, 0 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- 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;
 
--- 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) {