Mercurial > hg > graal-compiler
annotate graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java @ 2741:a3cd5eb68837
more GraphBuilder cleanup, moved mergeOrClone to GraphBuilder
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 20 May 2011 11:11:33 +0200 |
parents | c1a9bf38da28 |
children | bfcdda4fdd73 |
rev | line source |
---|---|
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
1 /* |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
2 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
4 * |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
8 * |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
13 * accompanied this code). |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
14 * |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
18 * |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
21 * questions. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
22 */ |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
23 package com.sun.c1x.ir; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
24 |
2582
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
25 import com.oracle.graal.graph.*; |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
26 import com.sun.c1x.*; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
27 import com.sun.c1x.value.*; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
28 import com.sun.cri.ci.*; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
29 |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
30 /** |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
31 * Denotes an instruction node in the IR, which is a {@link Value} that |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
32 * can be added to a basic block (whereas other {@link Value} nodes such as {@link Phi} and |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
33 * {@link Local} cannot be added to basic blocks). |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
34 * |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
35 * Subclasses of instruction represent arithmetic and object operations, |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
36 * control flow operators, phi statements, method calls, the start of basic blocks, and |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
37 * the end of basic blocks. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
38 * |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
39 * Instruction nodes are chained together in a basic block through the embedded |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
40 * {@link Instruction#next} field. An Instruction may also have a list of {@link ExceptionHandler}s. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
41 */ |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
42 public abstract class Instruction extends Value { |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
43 |
2585 | 44 private static final int INPUT_COUNT = 0; |
2582
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
45 |
2585 | 46 private static final int SUCCESSOR_COUNT = 1; |
47 private static final int SUCCESSOR_NEXT = 0; | |
2582
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
48 |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
49 @Override |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
50 protected int inputCount() { |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
51 return super.inputCount() + INPUT_COUNT; |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
52 } |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
53 |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
54 @Override |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
55 protected int successorCount() { |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
56 return super.successorCount() + SUCCESSOR_COUNT; |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
57 } |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
58 |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
59 /** |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
60 * Links to next instruction in a basic block, to {@code null} if this instruction is the end of a basic block or to |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
61 * itself if not in a block. |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
62 */ |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
63 public Instruction next() { |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
64 return (Instruction) successors().get(super.successorCount() + SUCCESSOR_NEXT); |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
65 } |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
66 |
2584
06b2eac2f5d3
changed Instruction.isAppended to boolean flag (instead of next == this logic)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2582
diff
changeset
|
67 private Node setNext(Instruction next) { |
2582
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
68 return successors().set(super.successorCount() + SUCCESSOR_NEXT, next); |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
69 } |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
70 |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
71 |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
72 public static final int SYNCHRONIZATION_ENTRY_BCI = -1; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
73 |
2584
06b2eac2f5d3
changed Instruction.isAppended to boolean flag (instead of next == this logic)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2582
diff
changeset
|
74 private boolean isAppended = false; |
06b2eac2f5d3
changed Instruction.isAppended to boolean flag (instead of next == this logic)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2582
diff
changeset
|
75 |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
76 /** |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
77 * Constructs a new instruction with the specified value type. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
78 * @param kind the value type for this instruction |
2582
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
79 * @param inputCount |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
80 * @param successorCount |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
81 */ |
2582
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
82 public Instruction(CiKind kind, int inputCount, int successorCount, Graph graph) { |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
83 super(kind, inputCount + INPUT_COUNT, successorCount + SUCCESSOR_COUNT, graph); |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
84 C1XMetrics.HIRInstructions++; |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
85 } |
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
86 |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
87 /** |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
88 * Checks whether this instruction has already been added to its basic block. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
89 * @return {@code true} if this instruction has been added to the basic block containing it |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
90 */ |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
91 public final boolean isAppended() { |
2584
06b2eac2f5d3
changed Instruction.isAppended to boolean flag (instead of next == this logic)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2582
diff
changeset
|
92 return isAppended; |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
93 } |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
94 |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
95 |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
96 /** |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
97 * Sets the next instruction for this instruction. Note that it is illegal to |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
98 * set the next field of a phi, block end, or local instruction. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
99 * @param next the next instruction |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
100 * @param bci the bytecode index of the next instruction |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
101 * @return the new next instruction |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
102 */ |
2716
c1a9bf38da28
Removed bci from the Instruction class.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2715
diff
changeset
|
103 public final Instruction appendNext(Instruction next) { |
2582
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
104 setNext(next); |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
105 if (next != null) { |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
106 assert !(this instanceof BlockEnd); |
2584
06b2eac2f5d3
changed Instruction.isAppended to boolean flag (instead of next == this logic)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2582
diff
changeset
|
107 next.isAppended = true; |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
108 } |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
109 return next; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
110 } |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
111 |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
112 @Override |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
113 public BlockBegin block() { |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
114 Instruction cur = this; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
115 while (!(cur instanceof BlockEnd)) { |
2582
768d77a1c7af
new node layout: Instruction
Lukas Stadler <lukas.stadler@jku.at>
parents:
2541
diff
changeset
|
116 cur = cur.next(); |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
117 } |
2624
8e44074058af
remove explicit pointer from BlockEnd to BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
2616
diff
changeset
|
118 return ((BlockEnd) cur).begin(); |
2507
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
119 } |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
120 |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
121 /** |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
122 * Compute the value number of this Instruction. Local and global value numbering |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
123 * optimizations use a hash map, and the value number provides a hash code. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
124 * If the instruction cannot be value numbered, then this method should return |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
125 * {@code 0}. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
126 * @return the hashcode of this instruction |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
127 */ |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
128 public int valueNumber() { |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
129 return 0; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
130 } |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
131 |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
132 /** |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
133 * Checks that this instruction is equal to another instruction for the purposes |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
134 * of value numbering. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
135 * @param i the other instruction |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
136 * @return {@code true} if this instruction is equivalent to the specified |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
137 * instruction w.r.t. value numbering |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
138 */ |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
139 public boolean valueEqual(Instruction i) { |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
140 return false; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
141 } |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
142 |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
143 /** |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
144 * Gets the state after the instruction, if it is recorded. Typically only |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
145 * instances of {@link BlockEnd} have a non-null state after. |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
146 * @return the state after the instruction |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
147 */ |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
148 public FrameState stateAfter() { |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
149 return null; |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
150 } |
9ec15d6914ca
Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff
changeset
|
151 } |