< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java
Print this page
rev 52889 : 8214023: Update Graal
*** 1,7 ****
/*
! * Copyright (c) 2011, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2011, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 25,37 ****
package org.graalvm.compiler.core.test;
import java.util.HashMap;
import java.util.Map;
- import org.junit.Assert;
- import org.junit.Test;
-
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.iterators.NodeIterable;
import org.graalvm.compiler.nodes.ConstantNode;
import org.graalvm.compiler.nodes.FrameState;
import org.graalvm.compiler.nodes.Invoke;
--- 25,34 ----
*** 39,50 ****
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.java.MonitorExitNode;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
- import org.graalvm.compiler.phases.common.inlining.InliningPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
/**
* In the following tests, the usages of local variable "a" are replaced with the integer constant
* 0. Then canonicalization is applied and it is verified that the resulting graph is equal to the
* graph of the method that just has a "return 1" statement in it.
--- 36,48 ----
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.java.MonitorExitNode;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
+ import org.junit.Assert;
+ import org.junit.Test;
/**
* In the following tests, the usages of local variable "a" are replaced with the integer constant
* 0. Then canonicalization is applied and it is verified that the resulting graph is equal to the
* graph of the method that just has a "return 1" statement in it.
*** 103,113 ****
Map<Invoke, Double> hints = new HashMap<>();
for (Invoke invoke : graph.getInvokes()) {
hints.put(invoke, 1000d);
}
HighTierContext context = getDefaultHighTierContext();
! new InliningPhase(hints, new CanonicalizerPhase()).apply(graph, context);
new CanonicalizerPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
return graph;
}
--- 101,111 ----
Map<Invoke, Double> hints = new HashMap<>();
for (Invoke invoke : graph.getInvokes()) {
hints.put(invoke, 1000d);
}
HighTierContext context = getDefaultHighTierContext();
! createInliningPhase(hints, new CanonicalizerPhase()).apply(graph, context);
new CanonicalizerPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
return graph;
}
< prev index next >