|
32 | 32 | import com.oracle.svm.core.graal.nodes.SubstrateFieldLocationIdentity; |
33 | 33 | import com.oracle.svm.hosted.analysis.tesa.effect.LocationEffect; |
34 | 34 | import com.oracle.svm.hosted.code.AnalysisToHostedGraphTransplanter; |
35 | | -import com.oracle.svm.hosted.meta.HostedMethod; |
36 | 35 | import com.oracle.svm.hosted.meta.HostedUniverse; |
37 | 36 |
|
38 | 37 | import jdk.graal.compiler.graph.Node; |
@@ -65,6 +64,7 @@ protected LocationEffect anyEffect() { |
65 | 64 | protected LocationEffect computeInitialState(AnalysisMethod method, StructuredGraph graph) { |
66 | 65 | LocationEffect location = noEffect(); |
67 | 66 | for (Node node : graph.getNodes()) { |
| 67 | + assert !(node instanceof SafepointNode) : KilledLocationTesa.class.getSimpleName() + " does not support safepoints."; |
68 | 68 | if (!isSupportedNode(node)) { |
69 | 69 | return anyEffect(); |
70 | 70 | } |
@@ -101,23 +101,6 @@ public static LocationIdentity[] extractLocationIdentities(Node node) { |
101 | 101 | }; |
102 | 102 | } |
103 | 103 |
|
104 | | - @Override |
105 | | - protected void onOptimizableMethodDiscovered(HostedMethod method, LocationEffect state, StructuredGraph graph) { |
106 | | - assert checkNoSafepointNodes(method, state, graph); |
107 | | - } |
108 | | - |
109 | | - /** |
110 | | - * Methods containing {@link SafepointNode} can kill multiple locations, which we do not track |
111 | | - * precisely at the moment. To guarantee correctness, we verify that only methods without |
112 | | - * safepoints have more precise killed location than {@code any}. |
113 | | - */ |
114 | | - private static boolean checkNoSafepointNodes(HostedMethod method, LocationEffect state, StructuredGraph graph) { |
115 | | - for (Node node : graph.getNodes()) { |
116 | | - AnalysisError.guarantee(!(node instanceof SafepointNode), "Method %s has a safepoint node in its graph, but its killed location is not any: %s", method.getQualifiedName(), state); |
117 | | - } |
118 | | - return true; |
119 | | - } |
120 | | - |
121 | 104 | @Override |
122 | 105 | protected void optimizeInvoke(HostedUniverse universe, StructuredGraph graph, Invoke invoke, LocationEffect targetState) { |
123 | 106 | switch (targetState) { |
|
0 commit comments