author | coleenp |
Fri, 04 Jan 2019 15:06:01 -0500 | |
changeset 53149 | 259c36ef27df |
parent 47216 | 71c04702a3d5 |
child 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
25930 | 2 |
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
2862
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
2862
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
2862
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#ifndef SHARE_VM_OPTO_CONNODE_HPP |
26 |
#define SHARE_VM_OPTO_CONNODE_HPP |
|
27 |
||
28 |
#include "opto/node.hpp" |
|
29 |
#include "opto/opcodes.hpp" |
|
30 |
#include "opto/type.hpp" |
|
31 |
||
1 | 32 |
class PhaseTransform; |
33 |
class MachNode; |
|
34 |
||
35 |
//------------------------------ConNode---------------------------------------- |
|
36 |
// Simple constants |
|
37 |
class ConNode : public TypeNode { |
|
38 |
public: |
|
22799
83e58bac7980
8027422: assert(_gvn.type(obj)->higher_equal(tjp)) failed: cast_up is no longer needed
roland
parents:
13974
diff
changeset
|
39 |
ConNode( const Type *t ) : TypeNode(t->remove_speculative(),1) { |
1 | 40 |
init_req(0, (Node*)Compile::current()->root()); |
41 |
init_flags(Flag_is_Con); |
|
42 |
} |
|
43 |
virtual int Opcode() const; |
|
44 |
virtual uint hash() const; |
|
45 |
virtual const RegMask &out_RegMask() const { return RegMask::Empty; } |
|
46 |
virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; } |
|
47 |
||
48 |
// Polymorphic factory method: |
|
25930 | 49 |
static ConNode* make(const Type *t); |
1 | 50 |
}; |
51 |
||
52 |
//------------------------------ConINode--------------------------------------- |
|
53 |
// Simple integer constants |
|
54 |
class ConINode : public ConNode { |
|
55 |
public: |
|
56 |
ConINode( const TypeInt *t ) : ConNode(t) {} |
|
57 |
virtual int Opcode() const; |
|
58 |
||
59 |
// Factory method: |
|
25930 | 60 |
static ConINode* make(int con) { |
24923
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
61 |
return new ConINode( TypeInt::make(con) ); |
1 | 62 |
} |
63 |
||
64 |
}; |
|
65 |
||
66 |
//------------------------------ConPNode--------------------------------------- |
|
67 |
// Simple pointer constants |
|
68 |
class ConPNode : public ConNode { |
|
69 |
public: |
|
70 |
ConPNode( const TypePtr *t ) : ConNode(t) {} |
|
71 |
virtual int Opcode() const; |
|
72 |
||
73 |
// Factory methods: |
|
25930 | 74 |
static ConPNode* make(address con) { |
1 | 75 |
if (con == NULL) |
24923
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
76 |
return new ConPNode( TypePtr::NULL_PTR ) ; |
1 | 77 |
else |
24923
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
78 |
return new ConPNode( TypeRawPtr::make(con) ); |
1 | 79 |
} |
80 |
}; |
|
81 |
||
82 |
||
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
83 |
//------------------------------ConNNode-------------------------------------- |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
84 |
// Simple narrow oop constants |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
85 |
class ConNNode : public ConNode { |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
86 |
public: |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
87 |
ConNNode( const TypeNarrowOop *t ) : ConNode(t) {} |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
88 |
virtual int Opcode() const; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
89 |
}; |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
90 |
|
13969
d2a189b83b87
7054512: Compress class pointers after perm gen removal
roland
parents:
13895
diff
changeset
|
91 |
//------------------------------ConNKlassNode--------------------------------- |
d2a189b83b87
7054512: Compress class pointers after perm gen removal
roland
parents:
13895
diff
changeset
|
92 |
// Simple narrow klass constants |
d2a189b83b87
7054512: Compress class pointers after perm gen removal
roland
parents:
13895
diff
changeset
|
93 |
class ConNKlassNode : public ConNode { |
d2a189b83b87
7054512: Compress class pointers after perm gen removal
roland
parents:
13895
diff
changeset
|
94 |
public: |
d2a189b83b87
7054512: Compress class pointers after perm gen removal
roland
parents:
13895
diff
changeset
|
95 |
ConNKlassNode( const TypeNarrowKlass *t ) : ConNode(t) {} |
d2a189b83b87
7054512: Compress class pointers after perm gen removal
roland
parents:
13895
diff
changeset
|
96 |
virtual int Opcode() const; |
d2a189b83b87
7054512: Compress class pointers after perm gen removal
roland
parents:
13895
diff
changeset
|
97 |
}; |
d2a189b83b87
7054512: Compress class pointers after perm gen removal
roland
parents:
13895
diff
changeset
|
98 |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
99 |
|
1 | 100 |
//------------------------------ConLNode--------------------------------------- |
101 |
// Simple long constants |
|
102 |
class ConLNode : public ConNode { |
|
103 |
public: |
|
104 |
ConLNode( const TypeLong *t ) : ConNode(t) {} |
|
105 |
virtual int Opcode() const; |
|
106 |
||
107 |
// Factory method: |
|
25930 | 108 |
static ConLNode* make(jlong con) { |
24923
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
109 |
return new ConLNode( TypeLong::make(con) ); |
1 | 110 |
} |
111 |
||
112 |
}; |
|
113 |
||
114 |
//------------------------------ConFNode--------------------------------------- |
|
115 |
// Simple float constants |
|
116 |
class ConFNode : public ConNode { |
|
117 |
public: |
|
118 |
ConFNode( const TypeF *t ) : ConNode(t) {} |
|
119 |
virtual int Opcode() const; |
|
120 |
||
121 |
// Factory method: |
|
25930 | 122 |
static ConFNode* make(float con) { |
24923
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
123 |
return new ConFNode( TypeF::make(con) ); |
1 | 124 |
} |
125 |
||
126 |
}; |
|
127 |
||
128 |
//------------------------------ConDNode--------------------------------------- |
|
129 |
// Simple double constants |
|
130 |
class ConDNode : public ConNode { |
|
131 |
public: |
|
132 |
ConDNode( const TypeD *t ) : ConNode(t) {} |
|
133 |
virtual int Opcode() const; |
|
134 |
||
135 |
// Factory method: |
|
25930 | 136 |
static ConDNode* make(double con) { |
24923
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
137 |
return new ConDNode( TypeD::make(con) ); |
1 | 138 |
} |
139 |
||
140 |
}; |
|
141 |
||
142 |
//------------------------------ThreadLocalNode-------------------------------- |
|
143 |
// Ideal Node which returns the base of ThreadLocalStorage. |
|
144 |
class ThreadLocalNode : public Node { |
|
145 |
public: |
|
23528 | 146 |
ThreadLocalNode( ) : Node((Node*)Compile::current()->root()) {} |
147 |
virtual int Opcode() const; |
|
148 |
virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM;} |
|
149 |
virtual uint ideal_reg() const { return Op_RegP; } |
|
23491 | 150 |
}; |
151 |
||
152 |
||
7397 | 153 |
|
154 |
#endif // SHARE_VM_OPTO_CONNODE_HPP |