annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java @ 11834:24ff15442a09

Remove DeoptimizingNode.getDeoptimizationReason
author Gilles Duboscq <duboscq@ssw.jku.at>
date Thu, 26 Sep 2013 16:10:02 +0200
parents 857f22a4f627
children d72c314260dc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
4181
319860ae697a Simplify FrameMap: make offsets of spill slots and outgoing parameters independent so that they can be allocated at the same time, eliminating the separate phases. This makes the separate StackBlock unnecesary. Change CiStackSlot to use byte offsets instead of spill slot index. This makes CiTarget.spillSlotSize unnecessary.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents: 3733
diff changeset
2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
4 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
8 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
13 * accompanied this code).
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
14 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
18 *
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
21 * questions.
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
22 */
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
23 package com.oracle.graal.nodes.spi;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
24
5510
426c605c9d3c Move cri.ci to api.code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5507
diff changeset
25 import com.oracle.graal.api.code.*;
5507
dc71b06d09f8 Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5506
diff changeset
26 import com.oracle.graal.api.meta.*;
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
27 import com.oracle.graal.nodes.*;
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
28 import com.oracle.graal.nodes.calc.*;
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
29 import com.oracle.graal.nodes.extended.*;
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
30 import com.oracle.graal.nodes.java.*;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
31
11288
857f22a4f627 Factor out arithmetic operations to separate LIR generator interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 10850
diff changeset
32 public interface LIRGeneratorTool extends ArithmeticLIRGenerator {
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
33
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
34 TargetDescription target();
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
35
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
36 CodeCacheProvider getRuntime();
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents: 6488
diff changeset
37
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
38 /**
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
39 * Checks whether the supplied constant can be used without loading it into a register for most
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
40 * operations, i.e., for commonly used arithmetic, logical, and comparison operations.
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
41 *
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
42 * @param c The constant to check.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
43 * @return True if the constant can be used directly, false if the constant needs to be in a
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
44 * register.
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
45 */
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
46 boolean canInlineConstant(Constant c);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
47
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
48 RegisterAttributes attributes(Register register);
5658
297f30d8d610 allowed RegisterNode to directly use a register not used by the register allocator
Doug Simon <doug.simon@oracle.com>
parents: 5547
diff changeset
49
9422
149fe42411df Use platform specific kind in backend.
Roland Schatz <roland.schatz@oracle.com>
parents: 9298
diff changeset
50 AllocatableValue newVariable(PlatformKind kind);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
51
9296
1342574c4f7d Move targets can only be AllocatableValues.
Roland Schatz <roland.schatz@oracle.com>
parents: 9292
diff changeset
52 AllocatableValue emitMove(Value input);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
53
9296
1342574c4f7d Move targets can only be AllocatableValues.
Roland Schatz <roland.schatz@oracle.com>
parents: 9292
diff changeset
54 void emitMove(AllocatableValue dst, Value src);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
55
9298
9ee5f3bfa755 Restructure load/store/lea LIR instructions.
Roland Schatz <roland.schatz@oracle.com>
parents: 9296
diff changeset
56 Value emitAddress(Value base, long displacement, Value index, int scale);
7861
c6d003891de0 Get rid of all direct usages of Address outside of backend.
Roland Schatz <roland.schatz@oracle.com>
parents: 7839
diff changeset
57
9298
9ee5f3bfa755 Restructure load/store/lea LIR instructions.
Roland Schatz <roland.schatz@oracle.com>
parents: 9296
diff changeset
58 Value emitAddress(StackSlot slot);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
59
9298
9ee5f3bfa755 Restructure load/store/lea LIR instructions.
Roland Schatz <roland.schatz@oracle.com>
parents: 9296
diff changeset
60 Value emitLoad(Kind kind, Value address, DeoptimizingNode deopting);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
61
9298
9ee5f3bfa755 Restructure load/store/lea LIR instructions.
Roland Schatz <roland.schatz@oracle.com>
parents: 9296
diff changeset
62 void emitStore(Kind kind, Value address, Value input, DeoptimizingNode deopting);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
63
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
64 void emitMembar(int barriers);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
65
11834
24ff15442a09 Remove DeoptimizingNode.getDeoptimizationReason
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 11288
diff changeset
66 void emitDeoptimize(DeoptimizationAction action, DeoptimizationReason reason, DeoptimizingNode deopting);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
67
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
68 void emitNullCheck(ValueNode v, DeoptimizingNode deopting);
8390
acc24060b64f Use implicit null checks for all null checks
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8300
diff changeset
69
9741
b27184f5f66b removed redundant parameter
Doug Simon <doug.simon@oracle.com>
parents: 9739
diff changeset
70 Value emitForeignCall(ForeignCallLinkage linkage, DeoptimizingNode info, Value... args);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
71
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
72 void emitIf(IfNode i);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
73
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
74 void emitConditional(ConditionalNode i);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
75
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
76 void emitSwitch(SwitchNode i);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
77
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
78 void emitInvoke(Invoke i);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
79
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
80 // Handling of block-end nodes still needs to be unified in the LIRGenerator.
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
81 void visitMerge(MergeNode i);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
82
9434
50f02c7d1cec Rename EndNode => AbstractEndNode and make abstract class. Introduce concrete EndNode subclass.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 9298
diff changeset
83 void visitEndNode(AbstractEndNode i);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
84
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
85 void visitLoopEnd(LoopEndNode i);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
86
10850
e7679ec4f27f Lower CAS nodes to their lowered versions
Christos Kotselidis <christos.kotselidis@oracle.com>
parents: 9741
diff changeset
87 void visitCompareAndSwap(LoweredCompareAndSwapNode i, Value address);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
88
6488
b3a75a3d9e1b removed more XIR remnants
Doug Simon <doug.simon@oracle.com>
parents: 6472
diff changeset
89 // These methods define the contract a runtime specific backend must provide.
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
90
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
91 void visitReturn(ReturnNode i);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
92
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
93 void visitSafepointNode(SafepointNode i);
7530
5e3d1a68664e applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents: 7144
diff changeset
94
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
95 void visitBreakpointNode(BreakpointNode i);
8127
3d41998c30de Create new way of handling unwind that recalculates rbp from rsp. Remove unused instanceof slow path stub.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 7938
diff changeset
96
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
97 void emitUnwind(Value operand);
8282
59744882ddeb moved logic for reserving a special area/slot in a frame (e.g., for use during deoptimization) out of FrameMap and into platform specific backend class
Doug Simon <doug.simon@oracle.com>
parents: 8127
diff changeset
98
59744882ddeb moved logic for reserving a special area/slot in a frame (e.g., for use during deoptimization) out of FrameMap and into platform specific backend class
Doug Simon <doug.simon@oracle.com>
parents: 8127
diff changeset
99 /**
59744882ddeb moved logic for reserving a special area/slot in a frame (e.g., for use during deoptimization) out of FrameMap and into platform specific backend class
Doug Simon <doug.simon@oracle.com>
parents: 8127
diff changeset
100 * Called just before register allocation is performed on the LIR owned by this generator.
59744882ddeb moved logic for reserving a special area/slot in a frame (e.g., for use during deoptimization) out of FrameMap and into platform specific backend class
Doug Simon <doug.simon@oracle.com>
parents: 8127
diff changeset
101 */
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
102 void beforeRegisterAllocation();
9003
a8fea2979e63 eager infopoint mode (fka debug mode)
Michael Haupt <michael.haupt@oracle.com>
parents: 8892
diff changeset
103
9292
90ca451a2f28 Make LIRGeneratorTool an interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 9204
diff changeset
104 void visitInfopointNode(InfopointNode i);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
105 }