annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java @ 15006:e60ea0bf468d

remove StampFactory.dependency/extension/condition
author Lukas Stadler <lukas.stadler@oracle.com>
date Mon, 07 Apr 2014 11:32:08 +0200
parents 06e50d290784
children 882f4cb7cfcf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13152
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
1 /*
14978
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
2 * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
13152
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
4 *
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
8 *
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
13 * accompanied this code).
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
14 *
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
18 *
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
21 * questions.
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
22 */
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.nodes;
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
24
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
25 import com.oracle.graal.api.meta.*;
14978
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
26 import com.oracle.graal.graph.*;
13153
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
27 import com.oracle.graal.nodes.extended.*;
14978
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
28 import com.oracle.graal.nodes.type.*;
13152
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
29
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
30 /**
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
31 * The {@code PhiNode} represents the merging of dataflow in the memory graph.
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
32 */
15002
06e50d290784 isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15001
diff changeset
33 @NodeInfo(nameTemplate = "MemoryPhi({i#values}) {p#locationIdentity/s}", allowedUsageTypes = {InputType.Memory})
13153
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
34 public class MemoryPhiNode extends PhiNode implements MemoryNode {
13152
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
35
15001
27c04ee36dcb input types
Lukas Stadler <lukas.stadler@oracle.com>
parents: 14978
diff changeset
36 @Input(InputType.Memory) final NodeInputList<ValueNode> values = new NodeInputList<>(this);
14978
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
37 private final LocationIdentity locationIdentity;
13152
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
38
14978
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
39 public MemoryPhiNode(MergeNode merge, LocationIdentity locationIdentity) {
15006
e60ea0bf468d remove StampFactory.dependency/extension/condition
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15002
diff changeset
40 super(StampFactory.forVoid(), merge);
14978
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
41 this.locationIdentity = locationIdentity;
13152
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
42 }
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
43
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
44 public LocationIdentity getLocationIdentity() {
14978
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
45 return locationIdentity;
13152
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
46 }
13153
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
47
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
48 public MemoryCheckpoint asMemoryCheckpoint() {
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
49 return null;
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
50 }
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
51
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
52 public MemoryPhiNode asMemoryPhi() {
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
53 return this;
ae0001b445c0 Common base interface for nodes in the memory graph.
Roland Schatz <roland.schatz@oracle.com>
parents: 13152
diff changeset
54 }
14978
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
55
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
56 @Override
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
57 public NodeInputList<ValueNode> values() {
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
58 return values;
e302df8bf51c separate subclasses for value and guard phis and proxies
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
59 }
13152
640516a8ca6b Separate class for MemoryProxy and MemoryPhi.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
60 }