Mercurial > hg > truffle
annotate graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstruction.java @ 19526:8fc336a04d77
Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 20 Feb 2015 22:22:55 +0100 |
parents | 35481bcb5882 |
children | a69a7c0e0ccc |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
2 * Copyright (c) 2009, 2015, 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.lir; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
25 import java.lang.annotation.*; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
26 import java.util.*; |
4524
dcc8f5c6f394
Refactorings to prepare for LIR project splitting
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4522
diff
changeset
|
27 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
28 import static com.oracle.graal.lir.LIRInstruction.OperandFlag.*; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
29 import static com.oracle.graal.lir.LIRInstruction.OperandMode.*; |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
30 |
5510
426c605c9d3c
Move cri.ci to api.code.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5507
diff
changeset
|
31 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
|
32 import com.oracle.graal.api.meta.*; |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
33 import com.oracle.graal.debug.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
34 import com.oracle.graal.lir.asm.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 /** |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
37 * The base class for an {@code LIRInstruction}. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 */ |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
39 public abstract class LIRInstruction { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
40 public static final Value[] NO_OPERANDS = {}; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 /** |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 * Constants denoting how a LIR instruction uses an operand. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
44 */ |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
45 public enum OperandMode { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
47 * The value must have been defined before. It is alive before the instruction until the |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
48 * beginning of the instruction, but not necessarily throughout the instruction. A register |
9580
c59beafffb29
added use of javadoc links
Doug Simon <doug.simon@oracle.com>
parents:
9454
diff
changeset
|
49 * assigned to it can also be assigned to a {@link #TEMP} or {@link #DEF} operand. The value |
c59beafffb29
added use of javadoc links
Doug Simon <doug.simon@oracle.com>
parents:
9454
diff
changeset
|
50 * can be used again after the instruction, so the instruction must not modify the register. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
52 USE, |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
53 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
55 * The value must have been defined before. It is alive before the instruction and |
9580
c59beafffb29
added use of javadoc links
Doug Simon <doug.simon@oracle.com>
parents:
9454
diff
changeset
|
56 * throughout the instruction. A register assigned to it cannot be assigned to a |
c59beafffb29
added use of javadoc links
Doug Simon <doug.simon@oracle.com>
parents:
9454
diff
changeset
|
57 * {@link #TEMP} or {@link #DEF} operand. The value can be used again after the instruction, |
c59beafffb29
added use of javadoc links
Doug Simon <doug.simon@oracle.com>
parents:
9454
diff
changeset
|
58 * so the instruction must not modify the register. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
60 ALIVE, |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
63 * The value must not have been defined before, and must not be used after the instruction. |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
64 * The instruction can do whatever it wants with the register assigned to it (or not use it |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
65 * at all). |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
67 TEMP, |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
70 * The value must not have been defined before. The instruction has to assign a value to the |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
71 * register. The value can (and most likely will) be used after the instruction. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
73 DEF, |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
74 } |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
75 |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
76 @Retention(RetentionPolicy.RUNTIME) |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
77 @Target(ElementType.FIELD) |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
78 public static @interface Use { |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
79 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
80 OperandFlag[] value() default OperandFlag.REG; |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
81 } |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
82 |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
83 @Retention(RetentionPolicy.RUNTIME) |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
84 @Target(ElementType.FIELD) |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
85 public static @interface Alive { |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
86 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
87 OperandFlag[] value() default OperandFlag.REG; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
88 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
89 |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
90 @Retention(RetentionPolicy.RUNTIME) |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
91 @Target(ElementType.FIELD) |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
92 public static @interface Temp { |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
93 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
94 OperandFlag[] value() default OperandFlag.REG; |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
95 } |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
96 |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
97 @Retention(RetentionPolicy.RUNTIME) |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
98 @Target(ElementType.FIELD) |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
99 public static @interface Def { |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
100 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
101 OperandFlag[] value() default OperandFlag.REG; |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
102 } |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
103 |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
104 @Retention(RetentionPolicy.RUNTIME) |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
105 @Target(ElementType.FIELD) |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
106 public static @interface State { |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
107 } |
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
108 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
109 /** |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
110 * Flags for an operand. |
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
111 */ |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
112 public enum OperandFlag { |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
113 /** |
5572
8f9c9d372e31
small renaming and doc fixes
Lukas Stadler <lukas.stadler@jku.at>
parents:
5552
diff
changeset
|
114 * The value can be a {@link RegisterValue}. |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
115 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
116 REG, |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
117 |
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
118 /** |
5572
8f9c9d372e31
small renaming and doc fixes
Lukas Stadler <lukas.stadler@jku.at>
parents:
5552
diff
changeset
|
119 * The value can be a {@link StackSlot}. |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
120 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
121 STACK, |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
122 |
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
123 /** |
8165 | 124 * The value can be a {@link CompositeValue}. |
125 */ | |
126 COMPOSITE, | |
127 | |
128 /** | |
18187
9619ba4daf4c
Rename Constant to JavaConstant.
Roland Schatz <roland.schatz@oracle.com>
parents:
18163
diff
changeset
|
129 * The value can be a {@link JavaConstant}. |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
130 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
131 CONST, |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
132 |
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
133 /** |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5733
diff
changeset
|
134 * The value can be {@link Value#ILLEGAL}. |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
135 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
136 ILLEGAL, |
4245
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
137 |
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
138 /** |
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
139 * The register allocator should try to assign a certain register to improve code quality. |
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
140 * Use {@link LIRInstruction#forEachRegisterHint} to access the register hints. |
75c620f90ab9
Support stack-operands and register hints in new register allocator API
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4210
diff
changeset
|
141 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
142 HINT, |
4314
9ce8594bedaf
Allow CiAddress as Input and Alive operands of LIR instructions.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4245
diff
changeset
|
143 |
9ce8594bedaf
Allow CiAddress as Input and Alive operands of LIR instructions.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4245
diff
changeset
|
144 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
145 * The value can be uninitialized, e.g., a stack slot that has not written to before. This |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7521
diff
changeset
|
146 * is only used to avoid false positives in verification code. |
4314
9ce8594bedaf
Allow CiAddress as Input and Alive operands of LIR instructions.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4245
diff
changeset
|
147 */ |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
148 UNINITIALIZED, |
4314
9ce8594bedaf
Allow CiAddress as Input and Alive operands of LIR instructions.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4245
diff
changeset
|
149 } |
9ce8594bedaf
Allow CiAddress as Input and Alive operands of LIR instructions.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4245
diff
changeset
|
150 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
151 /** |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
152 * For validity checking of the operand flags defined by instruction subclasses. |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
153 */ |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
154 protected static final EnumMap<OperandMode, EnumSet<OperandFlag>> ALLOWED_FLAGS; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
155 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
156 static { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
157 ALLOWED_FLAGS = new EnumMap<>(OperandMode.class); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
158 ALLOWED_FLAGS.put(OperandMode.USE, EnumSet.of(REG, STACK, COMPOSITE, CONST, ILLEGAL, HINT, UNINITIALIZED)); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
159 ALLOWED_FLAGS.put(ALIVE, EnumSet.of(REG, STACK, COMPOSITE, CONST, ILLEGAL, HINT, UNINITIALIZED)); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
160 ALLOWED_FLAGS.put(TEMP, EnumSet.of(REG, COMPOSITE, CONST, ILLEGAL, HINT)); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
161 ALLOWED_FLAGS.put(DEF, EnumSet.of(REG, STACK, COMPOSITE, ILLEGAL, HINT)); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
162 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
163 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
164 /** |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
165 * The flags of the base and index value of an address. |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
166 */ |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
167 protected static final EnumSet<OperandFlag> ADDRESS_FLAGS = EnumSet.of(REG, ILLEGAL); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
168 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
169 private final LIRInstructionClass<?> instructionClass; |
11486
5d5bfb75dae0
added metrics for total number of Nodes, LIRInstructions and CompositeValues created (GRAAL-448)
Doug Simon <doug.simon@oracle.com>
parents:
9856
diff
changeset
|
170 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
171 /** |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
172 * Instruction id for register allocation. |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
173 */ |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
174 private int id; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
175 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
176 private static final DebugMetric LIR_NODE_COUNT = Debug.metric("LIRNodes"); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
177 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
178 /** |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
179 * Constructs a new LIR instruction. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
180 */ |
19526
8fc336a04d77
Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19525
diff
changeset
|
181 public LIRInstruction(LIRInstructionClass<? extends LIRInstruction> c) { |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
182 LIR_NODE_COUNT.increment(); |
19526
8fc336a04d77
Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19525
diff
changeset
|
183 instructionClass = c; |
8fc336a04d77
Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19525
diff
changeset
|
184 assert c.getClazz() == this.getClass(); |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
185 id = -1; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
186 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
187 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
188 public abstract void emitCode(CompilationResultBuilder crb); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
189 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
190 public final int id() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
191 return id; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
192 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
193 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
194 public final void setId(int id) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
195 this.id = id; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
196 } |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
197 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
198 public final String name() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
199 return instructionClass.getOpcode(this); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
200 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
201 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
202 public final boolean hasOperands() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
203 return instructionClass.hasOperands() || hasState() || destroysCallerSavedRegisters(); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
204 } |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
205 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
206 public final boolean hasState() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
207 return instructionClass.hasState(this); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
208 } |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
209 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
210 public boolean destroysCallerSavedRegisters() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
211 return false; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
212 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
213 |
16800
a62a928287e4
Add LIRInstruction.visitEach{Input,Alive,Output,State}(InstructionValueConsumer).
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
214 // ValuePositionProcedures |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
215 public final void forEachInputPos(ValuePositionProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
216 instructionClass.forEachUsePos(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
217 } |
16280
266db8cf4dc6
Add LIRInstruction.forEach*(ValuePositionProcedure proc).
Josef Eisl <josef.eisl@jku.at>
parents:
16279
diff
changeset
|
218 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
219 public final void forEachAlivePos(ValuePositionProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
220 instructionClass.forEachAlivePos(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
221 } |
16280
266db8cf4dc6
Add LIRInstruction.forEach*(ValuePositionProcedure proc).
Josef Eisl <josef.eisl@jku.at>
parents:
16279
diff
changeset
|
222 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
223 public final void forEachTempPos(ValuePositionProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
224 instructionClass.forEachTempPos(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
225 } |
16280
266db8cf4dc6
Add LIRInstruction.forEach*(ValuePositionProcedure proc).
Josef Eisl <josef.eisl@jku.at>
parents:
16279
diff
changeset
|
226 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
227 public final void forEachOutputPos(ValuePositionProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
228 instructionClass.forEachDefPos(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
229 } |
16280
266db8cf4dc6
Add LIRInstruction.forEach*(ValuePositionProcedure proc).
Josef Eisl <josef.eisl@jku.at>
parents:
16279
diff
changeset
|
230 |
16800
a62a928287e4
Add LIRInstruction.visitEach{Input,Alive,Output,State}(InstructionValueConsumer).
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
231 // InstructionValueProcedures |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
232 public final void forEachInput(InstructionValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
233 instructionClass.forEachUse(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
234 } |
16138
f315b1c0a590
Introduce InstructionValueProcedure.
Josef Eisl <josef.eisl@jku.at>
parents:
15193
diff
changeset
|
235 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
236 public final void forEachAlive(InstructionValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
237 instructionClass.forEachAlive(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
238 } |
16138
f315b1c0a590
Introduce InstructionValueProcedure.
Josef Eisl <josef.eisl@jku.at>
parents:
15193
diff
changeset
|
239 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
240 public final void forEachTemp(InstructionValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
241 instructionClass.forEachTemp(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
242 } |
16138
f315b1c0a590
Introduce InstructionValueProcedure.
Josef Eisl <josef.eisl@jku.at>
parents:
15193
diff
changeset
|
243 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
244 public final void forEachOutput(InstructionValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
245 instructionClass.forEachDef(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
246 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
247 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
248 public final void forEachState(InstructionValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
249 instructionClass.forEachState(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
250 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
251 |
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
252 // ValueProcedures |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
253 public final void forEachInput(ValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
254 instructionClass.forEachUse(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
255 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
256 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
257 public final void forEachAlive(ValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
258 instructionClass.forEachAlive(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
259 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
260 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
261 public final void forEachTemp(ValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
262 instructionClass.forEachTemp(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
263 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
264 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
265 public final void forEachOutput(ValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
266 instructionClass.forEachDef(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
267 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
268 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
269 public final void forEachState(ValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
270 instructionClass.forEachState(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
271 } |
16138
f315b1c0a590
Introduce InstructionValueProcedure.
Josef Eisl <josef.eisl@jku.at>
parents:
15193
diff
changeset
|
272 |
16800
a62a928287e4
Add LIRInstruction.visitEach{Input,Alive,Output,State}(InstructionValueConsumer).
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
273 // States |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
274 public final void forEachState(InstructionStateProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
275 instructionClass.forEachState(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
276 } |
5733
141b15521a39
use annotated fields for operands of LIR instructions
Christian Wimmer <christian.wimmer@oracle.com>
parents:
5711
diff
changeset
|
277 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
278 public final void forEachState(StateProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
279 instructionClass.forEachState(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
280 } |
17296
e03a25f5a260
Replace anonymous StateProcedures with Lambdas.
Josef Eisl <josef.eisl@jku.at>
parents:
17286
diff
changeset
|
281 |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
282 // InstructionValueConsumers |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
283 public final void visitEachInput(InstructionValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
284 instructionClass.forEachUse(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
285 } |
16800
a62a928287e4
Add LIRInstruction.visitEach{Input,Alive,Output,State}(InstructionValueConsumer).
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
286 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
287 public final void visitEachAlive(InstructionValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
288 instructionClass.forEachAlive(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
289 } |
16800
a62a928287e4
Add LIRInstruction.visitEach{Input,Alive,Output,State}(InstructionValueConsumer).
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
290 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
291 public final void visitEachTemp(InstructionValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
292 instructionClass.forEachTemp(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
293 } |
16800
a62a928287e4
Add LIRInstruction.visitEach{Input,Alive,Output,State}(InstructionValueConsumer).
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
294 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
295 public final void visitEachOutput(InstructionValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
296 instructionClass.forEachDef(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
297 } |
16800
a62a928287e4
Add LIRInstruction.visitEach{Input,Alive,Output,State}(InstructionValueConsumer).
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
298 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
299 public final void visitEachState(InstructionValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
300 instructionClass.forEachState(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
301 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
302 |
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
303 // ValueConsumers |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
304 public final void visitEachInput(ValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
305 instructionClass.forEachUse(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
306 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
307 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
308 public final void visitEachAlive(ValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
309 instructionClass.forEachAlive(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
310 } |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
311 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
312 public final void visitEachTemp(ValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
313 instructionClass.forEachTemp(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
314 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
315 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
316 public final void visitEachOutput(ValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
317 instructionClass.forEachDef(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
318 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
319 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
320 public final void visitEachState(ValueConsumer proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
321 instructionClass.forEachState(this, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
322 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
323 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
324 @SuppressWarnings("unused") |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
325 public final Value forEachRegisterHint(Value value, OperandMode mode, InstructionValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
326 return instructionClass.forEachRegisterHint(this, mode, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
327 } |
16800
a62a928287e4
Add LIRInstruction.visitEach{Input,Alive,Output,State}(InstructionValueConsumer).
Josef Eisl <josef.eisl@jku.at>
parents:
16796
diff
changeset
|
328 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
329 @SuppressWarnings("unused") |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
330 public final Value forEachRegisterHint(Value value, OperandMode mode, ValueProcedure proc) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
331 return instructionClass.forEachRegisterHint(this, mode, proc); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
332 } |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
333 |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
334 public void verify() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
335 } |
17285
3a834111a632
Make [Instruction]ValueProcedure and [Instruction]ValueConsumer a FunctionalInterface.
Josef Eisl <josef.eisl@jku.at>
parents:
17277
diff
changeset
|
336 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
337 public final String toStringWithIdPrefix() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
338 if (id != -1) { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
339 return String.format("%4d %s", id, toString()); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
340 } |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
341 return " " + toString(); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
342 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
343 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
344 @Override |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
345 public String toString() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
346 return instructionClass.toString(this); |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
347 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
348 |
19525
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
349 public LIRInstructionClass<?> getLIRInstructionClass() { |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
350 return instructionClass; |
35481bcb5882
Remove LIRInstruction interface. Rename LIRInstructionBase to LIRInstruction.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19470
diff
changeset
|
351 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
352 } |