1 /*
2 * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24
25 package org.graalvm.compiler.nodes.spi;
26
27 import java.util.Collection;
28 import java.util.List;
29
30 import org.graalvm.compiler.core.common.cfg.BlockMap;
31 import org.graalvm.compiler.core.common.type.Stamp;
32 import org.graalvm.compiler.graph.Node;
33 import org.graalvm.compiler.graph.NodeSourcePosition;
34 import org.graalvm.compiler.lir.LIRFrameState;
35 import org.graalvm.compiler.lir.gen.LIRGeneratorTool;
36 import org.graalvm.compiler.nodes.AbstractBeginNode;
37 import org.graalvm.compiler.nodes.AbstractEndNode;
38 import org.graalvm.compiler.nodes.AbstractMergeNode;
39 import org.graalvm.compiler.nodes.BreakpointNode;
40 import org.graalvm.compiler.nodes.DeoptimizingNode;
41 import org.graalvm.compiler.nodes.FullInfopointNode;
42 import org.graalvm.compiler.nodes.IfNode;
43 import org.graalvm.compiler.nodes.Invoke;
44 import org.graalvm.compiler.nodes.LoopEndNode;
45 import org.graalvm.compiler.nodes.SafepointNode;
46 import org.graalvm.compiler.nodes.StructuredGraph;
47 import org.graalvm.compiler.nodes.ValueNode;
48 import org.graalvm.compiler.nodes.calc.ConditionalNode;
49 import org.graalvm.compiler.nodes.cfg.Block;
50 import org.graalvm.compiler.nodes.extended.SwitchNode;
79
80 void visitBreakpointNode(BreakpointNode i);
81
82 void visitFullInfopointNode(FullInfopointNode i);
83
84 void setSourcePosition(NodeSourcePosition position);
85
86 LIRGeneratorTool getLIRGeneratorTool();
87
88 void emitOverflowCheckBranch(AbstractBeginNode overflowSuccessor, AbstractBeginNode next, Stamp compareStamp, double probability);
89
90 Value[] visitInvokeArguments(CallingConvention cc, Collection<ValueNode> arguments);
91
92 void doBlock(Block block, StructuredGraph graph, BlockMap<List<Node>> blockMap);
93
94 default OptionValues getOptions() {
95 return getLIRGeneratorTool().getResult().getLIR().getOptions();
96 }
97
98 void emitReadExceptionObject(ValueNode node);
99 }
|
1 /*
2 * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24
25 package org.graalvm.compiler.nodes.spi;
26
27 import java.util.Collection;
28 import java.util.List;
29
30 import org.graalvm.compiler.core.common.cfg.BlockMap;
31 import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
32 import org.graalvm.compiler.core.common.type.Stamp;
33 import org.graalvm.compiler.graph.Node;
34 import org.graalvm.compiler.graph.NodeSourcePosition;
35 import org.graalvm.compiler.lir.LIRFrameState;
36 import org.graalvm.compiler.lir.gen.LIRGeneratorTool;
37 import org.graalvm.compiler.nodes.AbstractBeginNode;
38 import org.graalvm.compiler.nodes.AbstractEndNode;
39 import org.graalvm.compiler.nodes.AbstractMergeNode;
40 import org.graalvm.compiler.nodes.BreakpointNode;
41 import org.graalvm.compiler.nodes.DeoptimizingNode;
42 import org.graalvm.compiler.nodes.FullInfopointNode;
43 import org.graalvm.compiler.nodes.IfNode;
44 import org.graalvm.compiler.nodes.Invoke;
45 import org.graalvm.compiler.nodes.LoopEndNode;
46 import org.graalvm.compiler.nodes.SafepointNode;
47 import org.graalvm.compiler.nodes.StructuredGraph;
48 import org.graalvm.compiler.nodes.ValueNode;
49 import org.graalvm.compiler.nodes.calc.ConditionalNode;
50 import org.graalvm.compiler.nodes.cfg.Block;
51 import org.graalvm.compiler.nodes.extended.SwitchNode;
80
81 void visitBreakpointNode(BreakpointNode i);
82
83 void visitFullInfopointNode(FullInfopointNode i);
84
85 void setSourcePosition(NodeSourcePosition position);
86
87 LIRGeneratorTool getLIRGeneratorTool();
88
89 void emitOverflowCheckBranch(AbstractBeginNode overflowSuccessor, AbstractBeginNode next, Stamp compareStamp, double probability);
90
91 Value[] visitInvokeArguments(CallingConvention cc, Collection<ValueNode> arguments);
92
93 void doBlock(Block block, StructuredGraph graph, BlockMap<List<Node>> blockMap);
94
95 default OptionValues getOptions() {
96 return getLIRGeneratorTool().getResult().getLIR().getOptions();
97 }
98
99 void emitReadExceptionObject(ValueNode node);
100
101 @SuppressWarnings("unused")
102 default ForeignCallLinkage lookupGraalStub(ValueNode valueNode) {
103 return null;
104 }
105
106 void matchBlock(Block b, StructuredGraph graph, StructuredGraph.ScheduleResult blockMap);
107 }
|