Skip to content

Commit 47253b2

Browse files
committed
Disable PartialEscapeAnalysis in ObjectCloneTest
1 parent 676ed13 commit 47253b2

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/hotspot/test/ObjectCloneTest.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -27,29 +27,39 @@
2727
import java.util.ArrayList;
2828
import java.util.Optional;
2929

30+
import org.junit.Assert;
31+
import org.junit.Test;
32+
3033
import jdk.graal.compiler.api.directives.GraalDirectives;
34+
import jdk.graal.compiler.core.common.GraalOptions;
3135
import jdk.graal.compiler.core.test.GraalCompilerTest;
3236
import jdk.graal.compiler.hotspot.replacements.ObjectCloneNode;
3337
import jdk.graal.compiler.nodes.GraphState;
3438
import jdk.graal.compiler.nodes.StructuredGraph;
3539
import jdk.graal.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
3640
import jdk.graal.compiler.options.OptionValues;
3741
import jdk.graal.compiler.phases.BasePhase;
42+
import jdk.graal.compiler.phases.common.HighTierLoweringPhase;
3843
import jdk.graal.compiler.phases.tiers.HighTierContext;
3944
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;
4347

4448
/**
4549
* Exercise intrinsification of {@link Object#clone}.
4650
*/
4751
public class ObjectCloneTest extends GraalCompilerTest {
4852

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+
4959
@Override
5060
protected Suites createSuites(OptionValues opts) {
5161
Suites suites = super.createSuites(opts);
52-
var pos = suites.getHighTier().findPhase(FinalPartialEscapePhase.class);
62+
var pos = suites.getHighTier().findPhase(HighTierLoweringPhase.class);
5363
pos.previous();
5464
pos.add(new BasePhase<HighTierContext>() {
5565
@Override

0 commit comments

Comments
 (0)