# HG changeset patch # User Lukas Stadler # Date 1365602250 -7200 # Node ID 02f57662b6c4ee6d2be6e3bb73310fc4aa37d7fb # Parent dcb9f151f0ec194908112f6f82bb66a03b207a39 remove monitor limitation form TailDuplicationPhase diff -r dcb9f151f0ec -r 02f57662b6c4 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java Wed Apr 10 15:00:22 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java Wed Apr 10 15:57:30 2013 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,7 +46,6 @@ /* * Various metrics on the circumstances in which tail duplication was/wasn't performed. */ - private static final DebugMetric metricDuplicationMonitors = Debug.metric("DuplicationMonitors"); private static final DebugMetric metricDuplicationEnd = Debug.metric("DuplicationEnd"); private static final DebugMetric metricDuplicationEndPerformed = Debug.metric("DuplicationEndPerformed"); private static final DebugMetric metricDuplicationOther = Debug.metric("DuplicationOther"); @@ -168,20 +167,11 @@ assert replacements == null || replacements.size() == merge.forwardEndCount(); FixedNode fixed = merge; int fixedCount = 0; - boolean containsMonitor = false; while (fixed instanceof FixedWithNextNode) { - if (fixed instanceof MonitorEnterNode || fixed instanceof MonitorExitNode) { - containsMonitor = true; - } fixed = ((FixedWithNextNode) fixed).next(); fixedCount++; } - if (containsMonitor) { - // cannot currently be handled - // TODO (ls) re-evaluate this limitation after changes to the lock representation and - // the LIR generator - metricDuplicationMonitors.increment(); - } else if (fixedCount > 1) { + if (fixedCount > 1) { if (fixed instanceof EndNode && !(((EndNode) fixed).merge() instanceof LoopBeginNode)) { metricDuplicationEnd.increment(); if (decision.doTransform(merge, fixedCount)) {