< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java

Print this page

        

*** 24,39 **** --- 24,50 ---- import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.nodes.ReturnNode; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions; + import org.graalvm.compiler.phases.OptimisticOptimizations; + import org.graalvm.compiler.phases.OptimisticOptimizations.Optimization; import org.graalvm.compiler.phases.common.CanonicalizerPhase; + import org.graalvm.compiler.phases.tiers.HighTierContext; import org.graalvm.compiler.phases.tiers.PhaseContext; import org.junit.Test; public class MergeCanonicalizerTest extends GraalCompilerTest { + /** + * These tests assume all code paths are reachable so disable profile based dead code removal. + */ + @Override + protected HighTierContext getDefaultHighTierContext() { + return new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL.remove(Optimization.RemoveNeverExecutedCode)); + } + public static int staticField; private int field; @Test
< prev index next >