Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2642:8932f1027050
Removed local value map.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 11 May 2011 14:15:14 +0200 |
parents | d1c5a798b73c |
children | 3b807c0c5eeb |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Wed May 11 14:12:24 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Wed May 11 14:15:14 2011 +0200 @@ -82,11 +82,6 @@ private final C1XCompilation compilation; private final CiStatistics stats; - /** - * Map used to implement local value numbering for the current block. - */ - private final ValueMap localValueMap; - private final BytecodeStream stream; // the bytecode stream // bci-to-block mapping private BlockMap blockMap; @@ -128,7 +123,6 @@ this.compilation = compilation; this.ir = ir; this.stats = compilation.stats; - this.localValueMap = C1XOptions.OptLocalValueNumbering ? new ValueMap() : null; log = C1XOptions.TraceBytecodeParserLevel > 0 ? new LogStream(TTY.out()) : null; stream = new BytecodeStream(compilation.method.code()); constantPool = compilation.runtime.getConstantPool(compilation.method); @@ -965,7 +959,6 @@ if (bci == Instruction.SYNCHRONIZATION_ENTRY_BCI) { monitorEnter.setStateAfter(frameState.create(0)); } - killMemoryMap(); // prevent any optimizations across synchronization } void genMonitorExit(Value x, int bci) { @@ -980,7 +973,6 @@ } appendWithoutOptimization(new MonitorExit(x, lockAddress, lockNumber, graph), bci); frameState.unlock(); - killMemoryMap(); // prevent any optimizations across synchronization } void genJsr(int dest) { @@ -1075,17 +1067,6 @@ // the instruction has already been added return x; } - if (localValueMap != null) { - // look in the local value map - Value r = localValueMap.findInsert(x); - if (r != x) { - C1XMetrics.LocalValueNumberHits++; - if (r instanceof Instruction) { - assert ((Instruction) r).isAppended() : "instruction " + r + "is not appended"; - } - return r; - } - } assert x.next() == null : "instruction should not have been appended yet"; assert lastInstr.next() == null : "cannot append instruction to instruction which isn't end (" + lastInstr + "->" + lastInstr.next() + ")"; @@ -1175,7 +1156,6 @@ if (!b.wasVisited()) { b.setWasVisited(true); // now parse the block - killMemoryMap(); curBlock = b; frameState.initializeFrom(b.stateBefore()); lastInstr = b; @@ -1515,12 +1495,6 @@ frameState.ipush(append(new ArrayLength(frameState.apop(), graph))); } - void killMemoryMap() { - if (localValueMap != null) { - localValueMap.killAll(); - } - } - boolean assumeLeafClass(RiType type) { if (type.isResolved()) { if (isFinal(type.accessFlags())) {