comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java @ 19396:7e2c87dae93e

Create static final NodeClass field named TYPE in Node subclasses.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 16 Feb 2015 15:43:03 +0100
parents ec0733b5a90a
children 61d3cb8e1280
comparison
equal deleted inserted replaced
19395:a306749d3e86 19396:7e2c87dae93e
1 /* 1 /*
2 * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
32 * Memory {@code PhiNode}s merge memory dependencies at control flow merges. 32 * Memory {@code PhiNode}s merge memory dependencies at control flow merges.
33 */ 33 */
34 @NodeInfo(nameTemplate = "MemoryPhi({i#values}) {p#locationIdentity/s}", allowedUsageTypes = {InputType.Memory}) 34 @NodeInfo(nameTemplate = "MemoryPhi({i#values}) {p#locationIdentity/s}", allowedUsageTypes = {InputType.Memory})
35 public final class MemoryPhiNode extends PhiNode implements MemoryNode { 35 public final class MemoryPhiNode extends PhiNode implements MemoryNode {
36 36
37 public static final NodeClass TYPE = NodeClass.get(MemoryPhiNode.class);
37 @Input(InputType.Memory) NodeInputList<ValueNode> values; 38 @Input(InputType.Memory) NodeInputList<ValueNode> values;
38 protected final LocationIdentity locationIdentity; 39 protected final LocationIdentity locationIdentity;
39 40
40 public MemoryPhiNode(AbstractMergeNode merge, LocationIdentity locationIdentity) { 41 public MemoryPhiNode(AbstractMergeNode merge, LocationIdentity locationIdentity) {
41 super(StampFactory.forVoid(), merge); 42 super(TYPE, StampFactory.forVoid(), merge);
42 this.locationIdentity = locationIdentity; 43 this.locationIdentity = locationIdentity;
43 this.values = new NodeInputList<>(this); 44 this.values = new NodeInputList<>(this);
44 } 45 }
45 46
46 public MemoryPhiNode(AbstractMergeNode merge, LocationIdentity locationIdentity, ValueNode[] values) { 47 public MemoryPhiNode(AbstractMergeNode merge, LocationIdentity locationIdentity, ValueNode[] values) {
47 super(StampFactory.forVoid(), merge); 48 super(TYPE, StampFactory.forVoid(), merge);
48 this.locationIdentity = locationIdentity; 49 this.locationIdentity = locationIdentity;
49 this.values = new NodeInputList<>(this, values); 50 this.values = new NodeInputList<>(this, values);
50 } 51 }
51 52
52 public LocationIdentity getLocationIdentity() { 53 public LocationIdentity getLocationIdentity() {