annotate graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ValueVisitor.java @ 2974:d69b4d2eb499

Cleaned up code around moveToPhi. The function is now explicitely called for EndNode and LoopEnd.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 15 Jun 2011 17:45:00 +0200
parents bf15ed11c2bc
children ac6fb0c93ffb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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, 2011, 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 */
2874
d90bf514d647 Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 2872
diff changeset
23 package com.oracle.max.graal.compiler.ir;
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
24
2874
d90bf514d647 Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 2872
diff changeset
25 import com.oracle.max.graal.compiler.value.*;
2616
3558ca7088c0 FrameState and Graphviz changes:
Lukas Stadler <lukas.stadler@jku.at>
parents: 2538
diff changeset
26
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
27 /**
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
28 * The {@link ValueVisitor} implements one half of the visitor
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
29 * pattern for {@linkplain Value IR values}, allowing clients to implement functionality
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
30 * depending on the type of an value without doing type tests.
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
31 */
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
32 public abstract class ValueVisitor {
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
33 // Checkstyle: stop
2852
c6bdec623ef9 Move TypeCHeck to floating nodes, rename Nodes to aboid using an *Op suffix
Gilles Duboscq <gilles.duboscq@oracle.com>
parents: 2833
diff changeset
34 public abstract void visitArithmetic(Arithmetic i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
35 public abstract void visitArrayLength(ArrayLength i);
2793
d3fc4fe063bf Rename BlockBegin to Merge, remove some Block related member from it. Made CFGPrinter work with the Block class from schedule
Gilles Duboscq <gilles.duboscq@oracle.com>
parents: 2707
diff changeset
36 public abstract void visitMerge(Merge i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
37 public abstract void visitCheckCast(CheckCast i);
2862
45422967cbcf Rename Materialize => NormalizeCompare
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 2858
diff changeset
38 public abstract void visitMaterialize(NormalizeCompare i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
39 public abstract void visitConstant(Constant i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
40 public abstract void visitConvert(Convert i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
41 public abstract void visitExceptionObject(ExceptionObject i);
2974
d69b4d2eb499 Cleaned up code around moveToPhi. The function is now explicitely called for EndNode and LoopEnd.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 2940
diff changeset
42 public abstract void visitEndNode(EndNode i);
2616
3558ca7088c0 FrameState and Graphviz changes:
Lukas Stadler <lukas.stadler@jku.at>
parents: 2538
diff changeset
43 public abstract void visitFrameState(FrameState i);
2822
530366123e46 Invoke is a block end
Gilles Duboscq <gilles.duboscq@oracle.com>
parents: 2796
diff changeset
44 public abstract void visitAnchor(Anchor i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
45 public abstract void visitIf(If i);
2852
c6bdec623ef9 Move TypeCHeck to floating nodes, rename Nodes to aboid using an *Op suffix
Gilles Duboscq <gilles.duboscq@oracle.com>
parents: 2833
diff changeset
46 public abstract void visitIfOp(Conditional i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
47 public abstract void visitInstanceOf(InstanceOf i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
48 public abstract void visitInvoke(Invoke i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
49 public abstract void visitLoadField(LoadField i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
50 public abstract void visitLoadIndexed(LoadIndexed i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
51 public abstract void visitLocal(Local i);
2852
c6bdec623ef9 Move TypeCHeck to floating nodes, rename Nodes to aboid using an *Op suffix
Gilles Duboscq <gilles.duboscq@oracle.com>
parents: 2833
diff changeset
52 public abstract void visitLogic(Logic i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
53 public abstract void visitLookupSwitch(LookupSwitch i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
54 public abstract void visitMonitorAddress(MonitorAddress monitorAddress);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
55 public abstract void visitMonitorEnter(MonitorEnter i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
56 public abstract void visitMonitorExit(MonitorExit i);
2852
c6bdec623ef9 Move TypeCHeck to floating nodes, rename Nodes to aboid using an *Op suffix
Gilles Duboscq <gilles.duboscq@oracle.com>
parents: 2833
diff changeset
57 public abstract void visitNegate(Negate i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
58 public abstract void visitNewInstance(NewInstance i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
59 public abstract void visitNewMultiArray(NewMultiArray i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
60 public abstract void visitNewObjectArray(NewObjectArray i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
61 public abstract void visitNewTypeArray(NewTypeArray i);
2940
bf15ed11c2bc Rename ClipNode=>FixedGuard and FixedNullCheck=>IsNonNull.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 2922
diff changeset
62 public abstract void visitFixedGuard(FixedGuard fixedGuard);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
63 public abstract void visitPhi(Phi i);
2519
f6125fb5bfbc Removed intrinsics.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 2515
diff changeset
64 public abstract void visitRegisterFinalizer(RegisterFinalizer i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
65 public abstract void visitReturn(Return i);
2852
c6bdec623ef9 Move TypeCHeck to floating nodes, rename Nodes to aboid using an *Op suffix
Gilles Duboscq <gilles.duboscq@oracle.com>
parents: 2833
diff changeset
66 public abstract void visitShift(Shift i);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
67 public abstract void visitStoreField(StoreField i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
68 public abstract void visitStoreIndexed(StoreIndexed i);
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
69 public abstract void visitTableSwitch(TableSwitch i);
2671
d8601d421b96 New Deoptimize node, remove ResolveClass node and replace it with deoptimization
Gilles Duboscq <gilles.duboscq@oracle.com>
parents: 2658
diff changeset
70 public abstract void visitDeoptimize(Deoptimize deoptimize);
2707
7ed72769d51a exception handling related changes:
Lukas Stadler <lukas.stadler@jku.at>
parents: 2671
diff changeset
71 public abstract void visitExceptionDispatch(ExceptionDispatch exceptionDispatch);
7ed72769d51a exception handling related changes:
Lukas Stadler <lukas.stadler@jku.at>
parents: 2671
diff changeset
72 public abstract void visitUnwind(Unwind unwind);
2799
e1dad0edd57a first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents: 2796
diff changeset
73 public abstract void visitLoopBegin(LoopBegin loopBegin);
e1dad0edd57a first part of loop reworking
Lukas Stadler <lukas.stadler@jku.at>
parents: 2796
diff changeset
74 public abstract void visitLoopEnd(LoopEnd loopEnd);
2866
7f14e6b48a9c added dead code elimination
Lukas Stadler <lukas.stadler@jku.at>
parents: 2833
diff changeset
75 public abstract void visitValueAnchor(ValueAnchor valueAnchor);
2922
e37f27b6af77 Changes to LIRBranch.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents: 2920
diff changeset
76 public abstract void visitGuardNode(GuardNode guardNode);
2507
9ec15d6914ca Pull over of compiler from maxine repository.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
diff changeset
77 }