|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
|
27 | 27 | import java.util.ArrayList;
|
28 | 28 | import java.util.Optional;
|
29 | 29 |
|
| 30 | +import org.junit.Assert; |
| 31 | +import org.junit.Test; |
| 32 | + |
30 | 33 | import jdk.graal.compiler.api.directives.GraalDirectives;
|
| 34 | +import jdk.graal.compiler.core.common.GraalOptions; |
31 | 35 | import jdk.graal.compiler.core.test.GraalCompilerTest;
|
32 | 36 | import jdk.graal.compiler.hotspot.replacements.ObjectCloneNode;
|
33 | 37 | import jdk.graal.compiler.nodes.GraphState;
|
34 | 38 | import jdk.graal.compiler.nodes.StructuredGraph;
|
35 | 39 | import jdk.graal.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
|
36 | 40 | import jdk.graal.compiler.options.OptionValues;
|
37 | 41 | import jdk.graal.compiler.phases.BasePhase;
|
| 42 | +import jdk.graal.compiler.phases.common.HighTierLoweringPhase; |
38 | 43 | import jdk.graal.compiler.phases.tiers.HighTierContext;
|
39 | 44 | import jdk.graal.compiler.phases.tiers.Suites;
|
40 |
| -import jdk.graal.compiler.virtual.phases.ea.FinalPartialEscapePhase; |
41 |
| -import org.junit.Assert; |
42 |
| -import org.junit.Test; |
| 45 | +import jdk.vm.ci.code.InstalledCode; |
| 46 | +import jdk.vm.ci.meta.ResolvedJavaMethod; |
43 | 47 |
|
44 | 48 | /**
|
45 | 49 | * Exercise intrinsification of {@link Object#clone}.
|
46 | 50 | */
|
47 | 51 | public class ObjectCloneTest extends GraalCompilerTest {
|
48 | 52 |
|
| 53 | + @Override |
| 54 | + protected InstalledCode getCode(final ResolvedJavaMethod installedCodeOwner, StructuredGraph graph, boolean forceCompile, boolean installAsDefault, OptionValues options) { |
| 55 | + OptionValues newOptions = new OptionValues(options, GraalOptions.PartialEscapeAnalysis, false); |
| 56 | + return super.getCode(installedCodeOwner, graph, forceCompile, installAsDefault, newOptions); |
| 57 | + } |
| 58 | + |
49 | 59 | @Override
|
50 | 60 | protected Suites createSuites(OptionValues opts) {
|
51 | 61 | Suites suites = super.createSuites(opts);
|
52 |
| - var pos = suites.getHighTier().findPhase(FinalPartialEscapePhase.class); |
| 62 | + var pos = suites.getHighTier().findPhase(HighTierLoweringPhase.class); |
53 | 63 | pos.previous();
|
54 | 64 | pos.add(new BasePhase<HighTierContext>() {
|
55 | 65 | @Override
|
|
0 commit comments