Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingAccessNode.java @ 20074:a7ee2e1f0d4e
remove UnboxNodes without usages (if object is non-null)
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Mon, 30 Mar 2015 13:59:59 +0200 |
parents | 8fc336a04d77 |
children |
rev | line source |
---|---|
4309
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
1 /* |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
4 * |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
8 * |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
14 * |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
18 * |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
21 * questions. |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
22 */ |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
23 package com.oracle.graal.nodes.extended; |
4309
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
24 |
12722
b87c2f34e0e0
Maintain lastLocationAccess in WriteNode.
Roland Schatz <roland.schatz@oracle.com>
parents:
11834
diff
changeset
|
25 import com.oracle.graal.api.meta.*; |
15198
2c0cfbf454b5
Move LIRTypeTool and Stamp to graal.compiler.common.
Josef Eisl <josef.eisl@jku.at>
parents:
15001
diff
changeset
|
26 import com.oracle.graal.compiler.common.type.*; |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
17276
diff
changeset
|
27 import com.oracle.graal.graph.*; |
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
|
28 import com.oracle.graal.nodeinfo.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
29 import com.oracle.graal.nodes.*; |
4309
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
30 |
16822
5d468add216f
added @NodeInfo annotations to all Node classes
Doug Simon <doug.simon@oracle.com>
parents:
15946
diff
changeset
|
31 @NodeInfo |
12722
b87c2f34e0e0
Maintain lastLocationAccess in WriteNode.
Roland Schatz <roland.schatz@oracle.com>
parents:
11834
diff
changeset
|
32 public abstract class FloatingAccessNode extends FloatingGuardedNode implements Access, MemoryAccess { |
19526
8fc336a04d77
Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19471
diff
changeset
|
33 public static final NodeClass<FloatingAccessNode> TYPE = NodeClass.create(FloatingAccessNode.class); |
4309
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
34 |
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
|
35 @Input ValueNode object; |
f90dcdbbb75e
switched to using new NodeFieldIterator and NodeFieldIterable for traversing Node inputs and successors
Doug Simon <doug.simon@oracle.com>
parents:
16841
diff
changeset
|
36 @Input(InputType.Association) LocationNode location; |
17276
ffb974bef674
moved Node valueNumber and valueEquals logic (optionally) to generated nodes
Doug Simon <doug.simon@oracle.com>
parents:
16897
diff
changeset
|
37 protected BarrierType barrierType; |
4309
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
38 |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
39 public ValueNode object() { |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
40 return object; |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
41 } |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
42 |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
43 public LocationNode location() { |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
44 return location; |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
45 } |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
46 |
14976
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13291
diff
changeset
|
47 public LocationNode accessLocation() { |
8396
c4028b279ebd
change naming in Access interface
Lukas Stadler <lukas.stadler@jku.at>
parents:
5833
diff
changeset
|
48 return location; |
c4028b279ebd
change naming in Access interface
Lukas Stadler <lukas.stadler@jku.at>
parents:
5833
diff
changeset
|
49 } |
c4028b279ebd
change naming in Access interface
Lukas Stadler <lukas.stadler@jku.at>
parents:
5833
diff
changeset
|
50 |
12722
b87c2f34e0e0
Maintain lastLocationAccess in WriteNode.
Roland Schatz <roland.schatz@oracle.com>
parents:
11834
diff
changeset
|
51 public LocationIdentity getLocationIdentity() { |
b87c2f34e0e0
Maintain lastLocationAccess in WriteNode.
Roland Schatz <roland.schatz@oracle.com>
parents:
11834
diff
changeset
|
52 return location.getLocationIdentity(); |
b87c2f34e0e0
Maintain lastLocationAccess in WriteNode.
Roland Schatz <roland.schatz@oracle.com>
parents:
11834
diff
changeset
|
53 } |
b87c2f34e0e0
Maintain lastLocationAccess in WriteNode.
Roland Schatz <roland.schatz@oracle.com>
parents:
11834
diff
changeset
|
54 |
19471
880717e44675
Use typed NodeClass in node constructors.
Roland Schatz <roland.schatz@oracle.com>
parents:
19403
diff
changeset
|
55 protected FloatingAccessNode(NodeClass<? extends FloatingAccessNode> c, ValueNode object, LocationNode location, Stamp stamp) { |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
17276
diff
changeset
|
56 super(c, stamp); |
4309
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
57 this.object = object; |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
58 this.location = location; |
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
59 } |
5080
68918a528cbe
experimental: dependencies on all ValueNodes
Lukas Stadler <lukas.stadler@jku.at>
parents:
5076
diff
changeset
|
60 |
19471
880717e44675
Use typed NodeClass in node constructors.
Roland Schatz <roland.schatz@oracle.com>
parents:
19403
diff
changeset
|
61 protected FloatingAccessNode(NodeClass<? extends FloatingAccessNode> c, ValueNode object, LocationNode location, Stamp stamp, GuardingNode guard, BarrierType barrierType) { |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
17276
diff
changeset
|
62 super(c, stamp, guard); |
5387
b6aaf6de4053
use dependencies collection instead of explicit guard fields
Lukas Stadler <lukas.stadler@jku.at>
parents:
5299
diff
changeset
|
63 this.object = object; |
5080
68918a528cbe
experimental: dependencies on all ValueNodes
Lukas Stadler <lukas.stadler@jku.at>
parents:
5076
diff
changeset
|
64 this.location = location; |
9850
6e0c6526334b
Add HeapInfo interface for write barriers and compressed oops support
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9794
diff
changeset
|
65 this.barrierType = barrierType; |
5080
68918a528cbe
experimental: dependencies on all ValueNodes
Lukas Stadler <lukas.stadler@jku.at>
parents:
5076
diff
changeset
|
66 } |
5833
2a9fda4f9f1e
Fix canonicalisation of final reads and factor out read/floating read canonicalization code
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
5443
diff
changeset
|
67 |
2a9fda4f9f1e
Fix canonicalisation of final reads and factor out read/floating read canonicalization code
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
5443
diff
changeset
|
68 @Override |
10828
b05e1ff3aac0
Rename WriteBarrierType to BarrierType
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
10821
diff
changeset
|
69 public BarrierType getBarrierType() { |
9850
6e0c6526334b
Add HeapInfo interface for write barriers and compressed oops support
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9794
diff
changeset
|
70 return barrierType; |
6e0c6526334b
Add HeapInfo interface for write barriers and compressed oops support
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9794
diff
changeset
|
71 } |
6e0c6526334b
Add HeapInfo interface for write barriers and compressed oops support
Christos Kotselidis <christos.kotselidis@oracle.com>
parents:
9794
diff
changeset
|
72 |
14976
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13291
diff
changeset
|
73 public boolean canNullCheck() { |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13291
diff
changeset
|
74 return true; |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13291
diff
changeset
|
75 } |
82399ac30721
make implicit null checking optional for Access nodes (fixes CAS crash)
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13291
diff
changeset
|
76 |
13290
492c9907b9bf
Move Access.setNullCheck to FixedAccessNode.setNullCheck. FloatingAccessNode.asFixedNode retruns a FixedAccessNode
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12722
diff
changeset
|
77 public abstract FixedAccessNode asFixedNode(); |
4309
4a609a685fa4
changes to Node structures:
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
78 } |