Search in sources :

Example 1 with AnalysisUnsafePartitionStoreNode

use of com.oracle.graal.pointsto.nodes.AnalysisUnsafePartitionStoreNode in project graal by oracle.

the class SubstrateGraphBuilderPlugins method registerEdgesPlugins.

private static void registerEdgesPlugins(MetaAccessProvider metaAccess, InvocationPlugins plugins, boolean analysis) {
    if (analysis) {
        Registration r = new Registration(plugins, Edges.class).setAllowOverwrite(true);
        for (Class<?> c : new Class<?>[] { Node.class, NodeList.class }) {
            r.register2("get" + c.getSimpleName() + "Unsafe", Node.class, long.class, new InvocationPlugin() {

                @Override
                public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode node, ValueNode offset) {
                    b.addPush(JavaKind.Object, new // 
                    AnalysisUnsafePartitionLoadNode(// 
                    node, // 
                    offset, // 
                    JavaKind.Object, LocationIdentity.any(), GraalEdgeUnsafePartition.get(), metaAccess.lookupJavaType(c)));
                    return true;
                }
            });
            r.register3("put" + c.getSimpleName() + "Unsafe", Node.class, long.class, c, new InvocationPlugin() {

                @Override
                public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode node, ValueNode offset, ValueNode value) {
                    b.add(new AnalysisUnsafePartitionStoreNode(node, offset, value, JavaKind.Object, LocationIdentity.any(), GraalEdgeUnsafePartition.get(), metaAccess.lookupJavaType(c)));
                    return true;
                }
            });
        }
    }
}
Also used : WriteStackPointerNode(com.oracle.svm.core.graal.nodes.WriteStackPointerNode) AnalysisArraysCopyOfNode(com.oracle.graal.pointsto.nodes.AnalysisArraysCopyOfNode) StackValueNode(com.oracle.svm.core.graal.stackvalue.StackValueNode) SubstrateDynamicNewInstanceNode(com.oracle.svm.core.graal.nodes.SubstrateDynamicNewInstanceNode) DynamicPiNode(org.graalvm.compiler.nodes.DynamicPiNode) FormatArrayNode(com.oracle.svm.core.graal.nodes.FormatArrayNode) SubstrateArraysCopyOfNode(com.oracle.svm.core.graal.jdk.SubstrateArraysCopyOfNode) TestDeoptimizeNode(com.oracle.svm.core.graal.nodes.TestDeoptimizeNode) ReadRegisterFixedNode(com.oracle.svm.core.graal.nodes.ReadRegisterFixedNode) FixedGuardNode(org.graalvm.compiler.nodes.FixedGuardNode) PiNode(org.graalvm.compiler.nodes.PiNode) ReadStackPointerNode(com.oracle.svm.core.graal.nodes.ReadStackPointerNode) LogicNode(org.graalvm.compiler.nodes.LogicNode) ValueNode(org.graalvm.compiler.nodes.ValueNode) BasicObjectCloneNode(org.graalvm.compiler.replacements.nodes.BasicObjectCloneNode) ReadCallerStackPointerNode(com.oracle.svm.core.graal.nodes.ReadCallerStackPointerNode) ConstantNode(org.graalvm.compiler.nodes.ConstantNode) SubstrateObjectCloneNode(com.oracle.svm.core.graal.jdk.SubstrateObjectCloneNode) FormatObjectNode(com.oracle.svm.core.graal.nodes.FormatObjectNode) InstanceOfDynamicNode(org.graalvm.compiler.nodes.java.InstanceOfDynamicNode) LoadHubNode(org.graalvm.compiler.nodes.extended.LoadHubNode) NewPinnedInstanceNode(com.oracle.svm.core.graal.nodes.NewPinnedInstanceNode) ConvertUnknownValueNode(com.oracle.graal.pointsto.nodes.ConvertUnknownValueNode) SubstrateDynamicNewArrayNode(com.oracle.svm.core.graal.nodes.SubstrateDynamicNewArrayNode) ConditionalNode(org.graalvm.compiler.nodes.calc.ConditionalNode) NewPinnedArrayNode(com.oracle.svm.core.graal.nodes.NewPinnedArrayNode) AnalysisUnsafePartitionLoadNode(com.oracle.graal.pointsto.nodes.AnalysisUnsafePartitionLoadNode) FarReturnNode(com.oracle.svm.core.graal.nodes.FarReturnNode) FixedValueAnchorNode(org.graalvm.compiler.nodes.extended.FixedValueAnchorNode) ReadReturnAddressNode(com.oracle.svm.core.graal.nodes.ReadReturnAddressNode) ArrayLengthNode(org.graalvm.compiler.nodes.java.ArrayLengthNode) GetClassNode(org.graalvm.compiler.nodes.extended.GetClassNode) ReadInstructionPointerNode(com.oracle.svm.core.graal.nodes.ReadInstructionPointerNode) Node(org.graalvm.compiler.graph.Node) AnalysisUnsafePartitionStoreNode(com.oracle.graal.pointsto.nodes.AnalysisUnsafePartitionStoreNode) NodeList(org.graalvm.compiler.graph.NodeList) Receiver(org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.Receiver) Edges(org.graalvm.compiler.graph.Edges) GraphBuilderContext(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext) Registration(org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.Registration) AnalysisUnsafePartitionStoreNode(com.oracle.graal.pointsto.nodes.AnalysisUnsafePartitionStoreNode) StackValueNode(com.oracle.svm.core.graal.stackvalue.StackValueNode) ValueNode(org.graalvm.compiler.nodes.ValueNode) ConvertUnknownValueNode(com.oracle.graal.pointsto.nodes.ConvertUnknownValueNode) InvocationPlugin(org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin) ResolvedJavaMethod(jdk.vm.ci.meta.ResolvedJavaMethod) AnalysisUnsafePartitionLoadNode(com.oracle.graal.pointsto.nodes.AnalysisUnsafePartitionLoadNode)

Aggregations

AnalysisArraysCopyOfNode (com.oracle.graal.pointsto.nodes.AnalysisArraysCopyOfNode)1 AnalysisUnsafePartitionLoadNode (com.oracle.graal.pointsto.nodes.AnalysisUnsafePartitionLoadNode)1 AnalysisUnsafePartitionStoreNode (com.oracle.graal.pointsto.nodes.AnalysisUnsafePartitionStoreNode)1 ConvertUnknownValueNode (com.oracle.graal.pointsto.nodes.ConvertUnknownValueNode)1 SubstrateArraysCopyOfNode (com.oracle.svm.core.graal.jdk.SubstrateArraysCopyOfNode)1 SubstrateObjectCloneNode (com.oracle.svm.core.graal.jdk.SubstrateObjectCloneNode)1 FarReturnNode (com.oracle.svm.core.graal.nodes.FarReturnNode)1 FormatArrayNode (com.oracle.svm.core.graal.nodes.FormatArrayNode)1 FormatObjectNode (com.oracle.svm.core.graal.nodes.FormatObjectNode)1 NewPinnedArrayNode (com.oracle.svm.core.graal.nodes.NewPinnedArrayNode)1 NewPinnedInstanceNode (com.oracle.svm.core.graal.nodes.NewPinnedInstanceNode)1 ReadCallerStackPointerNode (com.oracle.svm.core.graal.nodes.ReadCallerStackPointerNode)1 ReadInstructionPointerNode (com.oracle.svm.core.graal.nodes.ReadInstructionPointerNode)1 ReadRegisterFixedNode (com.oracle.svm.core.graal.nodes.ReadRegisterFixedNode)1 ReadReturnAddressNode (com.oracle.svm.core.graal.nodes.ReadReturnAddressNode)1 ReadStackPointerNode (com.oracle.svm.core.graal.nodes.ReadStackPointerNode)1 SubstrateDynamicNewArrayNode (com.oracle.svm.core.graal.nodes.SubstrateDynamicNewArrayNode)1 SubstrateDynamicNewInstanceNode (com.oracle.svm.core.graal.nodes.SubstrateDynamicNewInstanceNode)1 TestDeoptimizeNode (com.oracle.svm.core.graal.nodes.TestDeoptimizeNode)1 WriteStackPointerNode (com.oracle.svm.core.graal.nodes.WriteStackPointerNode)1