Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
753c740
[GR-73325] Add bytecode handler template threading
mur47x111 Aug 14, 2026
3fe29ae
crema TOS
mur47x111 Aug 14, 2026
b92e894
[GR-73325] Optimize Crema TOS handlers
mur47x111 Aug 15, 2026
9fbba4a
[GR-73325] Refactor Crema interpreter state
mur47x111 Aug 15, 2026
991e001
[GR-73325] Optimize Crema wide constant handlers
mur47x111 Aug 15, 2026
8ac6e8c
[GR-77888] Keep pressure spills off unrelated paths
mur47x111 Aug 9, 2026
8b15851
[GR-73325] Simplify virtual stack peek operations
mur47x111 Aug 15, 2026
7c87621
[GR-73325] Simplify virtual stack slot operations
mur47x111 Aug 15, 2026
2267dfb
[GR-73325] Refine virtual stack operation boundaries
mur47x111 Aug 16, 2026
75cf601
[GR-73325] Refine type check handlers
mur47x111 Aug 16, 2026
ebf9094
[GR-73325] Inline virtual stack duplication operations
mur47x111 Aug 16, 2026
3ea2add
[GR-73325] Normalize constant pool index reads
mur47x111 Aug 16, 2026
82949b5
[GR-73325] Inline LDC2_W constant loading
mur47x111 Aug 16, 2026
9ba286b
[GR-73325] Refine handler state dependencies
mur47x111 Aug 16, 2026
0120c1e
[GR-73325] Optimize threaded type resolution
mur47x111 Aug 16, 2026
e6cb9ba
[GR-73325] Reduce CHECKCAST handler register pressure
mur47x111 Aug 16, 2026
d76445b
[GR-73325] Keep spills off threaded handler fast paths
mur47x111 Aug 16, 2026
56c4f07
[GR-73325] Fold single handler table constants
mur47x111 Aug 16, 2026
f87292c
[GR-73325] Preserve immutable field aliases across calls
mur47x111 Aug 16, 2026
187df62
[GR-73325] Anchor threaded handler dispatch values
mur47x111 Aug 16, 2026
aba26c0
[GR-73325] Preserve handler frame state before dispatch
mur47x111 Aug 17, 2026
144a6bc
[GR-73325] Consolidate interpreter state access
mur47x111 Aug 16, 2026
ec48934
[GR-73325] Preserve handler frame state at stub safepoints
mur47x111 Aug 17, 2026
7c4258d
[GR-73325] Simplify interpreter stack transitions
mur47x111 Aug 17, 2026
ff61734
[GR-73325] Simplify field handler stack transitions
mur47x111 Aug 18, 2026
19f90c5
Keep threaded handler spills on colder blocks
mur47x111 Aug 18, 2026
3637c5c
[GR-73325] Cache constant pool data in interpreter state
mur47x111 Aug 18, 2026
47e8154
[GR-73325] Cache static storage in interpreter fields
mur47x111 Aug 18, 2026
b465f3b
[GR-73325] Keep static field metadata branch-local
mur47x111 Aug 18, 2026
26636d9
[GR-73325] Anchor instance field metadata by kind
mur47x111 Aug 18, 2026
6280b04
[GR-73325] Keep field handler values branch-local
mur47x111 Aug 18, 2026
cd3cec0
Make threaded handler register recovery spillable
mur47x111 Aug 18, 2026
7862d8c
[GR-73325] Keep updated getstatic stack values path-local
mur47x111 Aug 19, 2026
8305995
[GR-73325] Initialize cached storage for runtime fields
mur47x111 Aug 19, 2026
99f5aa8
refactor
mur47x111 Aug 19, 2026
5a3fab3
[GR-73325] Keep invoke stack transitions in handlers
mur47x111 Aug 19, 2026
d0ea789
[GR-73325] Avoid empty invoke argument allocation
mur47x111 Aug 19, 2026
3fe8852
[GR-73325] Anchor updated field stack values
mur47x111 Aug 19, 2026
49d20a6
[GR-73325] Fix invoke handler fast path
mur47x111 Aug 19, 2026
52ad104
[GR-73325] Fix cached invocation arguments
mur47x111 Aug 19, 2026
89b17a5
Optimize threaded invoke handler setup
mur47x111 Aug 19, 2026
5cd4f8c
Reduce invoke argument pop register pressure
mur47x111 Aug 20, 2026
3634396
Add field read cache kill directive
mur47x111 Aug 20, 2026
ac6ee44
[GR-73325] Reduce invoke argument handler pressure
mur47x111 Aug 20, 2026
079a375
[GR-73325] Reduce invoke handler register pressure
mur47x111 Aug 20, 2026
3b9b197
[GR-73325] Reduce invoke argument allocation pressure
mur47x111 Aug 20, 2026
9e11b11
[GR-73325] Reduce invoke return-state pressure
mur47x111 Aug 21, 2026
a8097a8
[GR-73325] Avoid retaining invoke argument kinds
mur47x111 Aug 21, 2026
a24cf63
[GR-73325] Specialize cached invoke argument popping
mur47x111 Aug 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2026, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.api.directives.test;

import org.junit.Assert;
import org.junit.Test;

import jdk.graal.compiler.api.directives.GraalDirectives;
import jdk.graal.compiler.core.test.GraalCompilerTest;
import jdk.graal.compiler.nodes.StructuredGraph;
import jdk.graal.compiler.nodes.calc.ArbitraryValueNode;

public class ArbitraryValueDirectiveTest extends GraalCompilerTest {

public static long snippet(long value) {
return GraalDirectives.arbitraryValue(value);
}

@Test
public void testArbitraryValue() {
test("snippet", 42L);
}

@Override
protected void checkHighTierGraph(StructuredGraph graph) {
Assert.assertEquals(1, graph.getNodes().filter(ArbitraryValueNode.class).count());
ArbitraryValueNode arbitraryValue = graph.getNodes().filter(ArbitraryValueNode.class).first();
Assert.assertTrue(arbitraryValue.inputs().isEmpty());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright (c) 2026, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.api.directives.test;

import org.junit.Assert;
import org.junit.Test;

import jdk.graal.compiler.api.directives.GraalDirectives;
import jdk.graal.compiler.core.common.type.IntegerStamp;
import jdk.graal.compiler.core.test.GraalCompilerTest;
import jdk.graal.compiler.nodes.NodeView;
import jdk.graal.compiler.nodes.ReturnNode;
import jdk.graal.compiler.nodes.StructuredGraph;
import jdk.graal.compiler.nodes.calc.AssumeIntNode;
import jdk.graal.compiler.nodes.calc.NarrowNode;

public class AssumeFloatDirectiveTest extends GraalCompilerTest {

public static long snippet(long value) {
float assumedFloat = GraalDirectives.assumeFloat(value);
return Float.floatToRawIntBits(assumedFloat);
}

@Test
public void testAssumeFloat() {
test("snippet", (long) Float.floatToRawIntBits(Float.NEGATIVE_INFINITY));
test("snippet", (long) Float.floatToRawIntBits(-0.0f));
test("snippet", (long) Float.floatToRawIntBits(0.0f));
test("snippet", (long) Float.floatToRawIntBits(Float.NaN));
}

@Override
protected void checkHighTierGraph(StructuredGraph graph) {
Assert.assertEquals(1, graph.getNodes().filter(AssumeIntNode.class).count());
Assert.assertTrue(graph.getNodes().filter(NarrowNode.class).isEmpty());

ReturnNode returnNode = graph.getNodes(ReturnNode.TYPE).first();
IntegerStamp stamp = (IntegerStamp) returnNode.result().stamp(NodeView.DEFAULT);
Assert.assertEquals(64, stamp.getBits());
Assert.assertEquals(Integer.MIN_VALUE, stamp.lowerBound());
Assert.assertEquals(Integer.MAX_VALUE, stamp.upperBound());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright (c) 2026, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.api.directives.test;

import org.junit.Assert;
import org.junit.Test;

import jdk.graal.compiler.api.directives.GraalDirectives;
import jdk.graal.compiler.core.common.type.IntegerStamp;
import jdk.graal.compiler.core.test.GraalCompilerTest;
import jdk.graal.compiler.nodes.NodeView;
import jdk.graal.compiler.nodes.ReturnNode;
import jdk.graal.compiler.nodes.StructuredGraph;
import jdk.graal.compiler.nodes.calc.AssumeIntNode;
import jdk.graal.compiler.nodes.calc.NarrowNode;

public class AssumeIntDirectiveTest extends GraalCompilerTest {

public static long snippet(long value) {
long assumedInt = GraalDirectives.assumeInt(value);
return (int) assumedInt;
}

@Test
public void testAssumeInt() {
test("snippet", (long) Integer.MIN_VALUE);
test("snippet", -1L);
test("snippet", 0L);
test("snippet", (long) Integer.MAX_VALUE);
}

@Override
protected void checkHighTierGraph(StructuredGraph graph) {
Assert.assertEquals(1, graph.getNodes().filter(AssumeIntNode.class).count());
Assert.assertTrue(graph.getNodes().filter(NarrowNode.class).isEmpty());

ReturnNode returnNode = graph.getNodes(ReturnNode.TYPE).first();
IntegerStamp stamp = (IntegerStamp) returnNode.result().stamp(NodeView.DEFAULT);
Assert.assertEquals(64, stamp.getBits());
Assert.assertEquals(Integer.MIN_VALUE, stamp.lowerBound());
Assert.assertEquals(Integer.MAX_VALUE, stamp.upperBound());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Copyright (c) 2026, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.api.directives.test;

import org.junit.Assert;
import org.junit.Test;

import jdk.graal.compiler.api.directives.GraalDirectives;
import jdk.graal.compiler.core.test.GraalCompilerTest;
import jdk.graal.compiler.nodes.DeoptimizeNode;
import jdk.graal.compiler.nodes.StructuredGraph;
import jdk.graal.compiler.nodes.extended.PreserveFrameStateNode;
import jdk.graal.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
import jdk.graal.compiler.nodes.graphbuilderconf.GraphBuilderContext;
import jdk.graal.compiler.nodes.graphbuilderconf.InvocationPlugin;
import jdk.graal.compiler.nodes.graphbuilderconf.InvocationPlugins.Registration;
import jdk.vm.ci.meta.ResolvedJavaMethod;

public class PreserveFrameStateNodeTest extends GraalCompilerTest {

@Override
protected Plugins getDefaultGraphBuilderPlugins() {
Plugins plugins = super.getDefaultGraphBuilderPlugins();
Registration registration = new Registration(plugins.getInvocationPlugins(), PreserveFrameStateNodeTest.class);
registration.register(new InvocationPlugin("preserveFrameStateMarker") {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
b.add(new PreserveFrameStateNode());
return true;
}
});
return plugins;
}

public static int preserveBeforeDeopt(int value) {
int result = value + 1;
preserveFrameStateMarker();
GraalDirectives.deoptimizeAndInvalidate();
return result;
}

public static void preserveFrameStateMarker() {
}

@Test
public void testPreservesCurrentFrameState() {
ResolvedJavaMethod method = getResolvedJavaMethod("preserveBeforeDeopt");
StructuredGraph graph = parseForCompile(method);
PreserveFrameStateNode marker = graph.getNodes(PreserveFrameStateNode.TYPE).first();
Assert.assertNotNull(marker);
Assert.assertEquals(method, marker.stateAfter().getMethod());

DeoptimizeNode deoptimize = graph.getNodes(DeoptimizeNode.TYPE).first();
Assert.assertNotNull(deoptimize);
Assert.assertSame(marker, deoptimize.predecessor());
}
}
Loading