Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/BeginStateSplitNode.java @ 18346:ddd7829c45b1
made HotSpotCodeCacheProvider attempt to load and use the hcfdis tool
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 12 Nov 2014 12:55:21 +0100 |
parents | f90dcdbbb75e |
children | 480bd3b1adcd |
rev | line source |
---|---|
5362
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 */ |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
23 package com.oracle.graal.nodes; |
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
15198
2c0cfbf454b5
Move LIRTypeTool and Stamp to graal.compiler.common.
Josef Eisl <josef.eisl@jku.at>
parents:
15152
diff
changeset
|
25 import com.oracle.graal.compiler.common.type.*; |
16841
cbd42807a31f
moved NodeInfo and friends into separate com.oracle.graal.nodeinfo project so that annotation processor can be applied to the base Node class
Doug Simon <doug.simon@oracle.com>
parents:
16822
diff
changeset
|
26 import com.oracle.graal.nodeinfo.*; |
8441
21bf57680185
Fuse the ExceptionObject its DispatchBegin into a single node since it has to be atomic while gurads are floating
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7530
diff
changeset
|
27 |
5362
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
28 /** |
15145
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
29 * Base class for {@link BeginNode}s that are associated with a frame state. |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
30 * |
15152 | 31 * TODO (dnsimon) this not needed until {@link BeginNode} no longer implements {@link StateSplit} |
32 * which is not possible until loop peeling works without requiring begin nodes to have frames | |
33 * states. | |
5362
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
34 */ |
16822
5d468add216f
added @NodeInfo annotations to all Node classes
Doug Simon <doug.simon@oracle.com>
parents:
16332
diff
changeset
|
35 @NodeInfo |
15145
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
36 public abstract class BeginStateSplitNode extends BeginNode implements StateSplit { |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
37 |
16897
f90dcdbbb75e
switched to using new NodeFieldIterator and NodeFieldIterable for traversing Node inputs and successors
Doug Simon <doug.simon@oracle.com>
parents:
16841
diff
changeset
|
38 @OptionalInput(InputType.State) protected FrameState stateAfter; |
5364
827854645d6c
separated the notion of has-side-effect from may-have-frame-state
Doug Simon <doug.simon@oracle.com>
parents:
5362
diff
changeset
|
39 |
8441
21bf57680185
Fuse the ExceptionObject its DispatchBegin into a single node since it has to be atomic while gurads are floating
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7530
diff
changeset
|
40 public BeginStateSplitNode() { |
21bf57680185
Fuse the ExceptionObject its DispatchBegin into a single node since it has to be atomic while gurads are floating
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7530
diff
changeset
|
41 } |
21bf57680185
Fuse the ExceptionObject its DispatchBegin into a single node since it has to be atomic while gurads are floating
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7530
diff
changeset
|
42 |
21bf57680185
Fuse the ExceptionObject its DispatchBegin into a single node since it has to be atomic while gurads are floating
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7530
diff
changeset
|
43 protected BeginStateSplitNode(Stamp stamp) { |
21bf57680185
Fuse the ExceptionObject its DispatchBegin into a single node since it has to be atomic while gurads are floating
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7530
diff
changeset
|
44 super(stamp); |
21bf57680185
Fuse the ExceptionObject its DispatchBegin into a single node since it has to be atomic while gurads are floating
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7530
diff
changeset
|
45 } |
21bf57680185
Fuse the ExceptionObject its DispatchBegin into a single node since it has to be atomic while gurads are floating
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7530
diff
changeset
|
46 |
15145
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
47 public FrameState stateAfter() { |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
48 return stateAfter; |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
49 } |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
50 |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
51 public void setStateAfter(FrameState x) { |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
52 assert x == null || x.isAlive() : "frame state must be in a graph"; |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
53 updateUsages(stateAfter, x); |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
54 stateAfter = x; |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
55 } |
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12503
diff
changeset
|
56 |
5364
827854645d6c
separated the notion of has-side-effect from may-have-frame-state
Doug Simon <doug.simon@oracle.com>
parents:
5362
diff
changeset
|
57 /** |
827854645d6c
separated the notion of has-side-effect from may-have-frame-state
Doug Simon <doug.simon@oracle.com>
parents:
5362
diff
changeset
|
58 * A begin node has no side effect. |
827854645d6c
separated the notion of has-side-effect from may-have-frame-state
Doug Simon <doug.simon@oracle.com>
parents:
5362
diff
changeset
|
59 */ |
827854645d6c
separated the notion of has-side-effect from may-have-frame-state
Doug Simon <doug.simon@oracle.com>
parents:
5362
diff
changeset
|
60 @Override |
6534
feb579677b58
SnippetTemplate must not depend on CodeCacheProvider (only on MetaAccessProvider). This means that the hasSideEffect flag of a RuntimeCall must be already fixed in the RuntimeCall.Descriptor to avoid a lookup of the actual RuntimeCall using the CodeCacheProvider.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6521
diff
changeset
|
61 public boolean hasSideEffect() { |
5364
827854645d6c
separated the notion of has-side-effect from may-have-frame-state
Doug Simon <doug.simon@oracle.com>
parents:
5362
diff
changeset
|
62 return false; |
827854645d6c
separated the notion of has-side-effect from may-have-frame-state
Doug Simon <doug.simon@oracle.com>
parents:
5362
diff
changeset
|
63 } |
5362
d42425beb1d1
pulled AbstractStateSplit into FixedWithNextNode and made it no longer implement StateSplit. StateSplit is now implemented only by nodes that really have side effects.
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
64 } |