author | goetz |
Wed, 27 Nov 2013 16:16:21 -0800 | |
changeset 22856 | 03ad2cf18166 |
parent 21578 | d380e7e6f805 |
child 22911 | ff49c48c887d |
permissions | -rw-r--r-- |
20289 | 1 |
/* |
2 |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
|
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 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
* |
|
23 |
*/ |
|
24 |
||
25 |
#ifndef SHARE_VM_OPTO_MATHEXACTNODE_HPP |
|
26 |
#define SHARE_VM_OPTO_MATHEXACTNODE_HPP |
|
27 |
||
28 |
#include "opto/multnode.hpp" |
|
29 |
#include "opto/node.hpp" |
|
20715
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
30 |
#include "opto/subnode.hpp" |
20289 | 31 |
#include "opto/type.hpp" |
32 |
||
20715
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
33 |
class BoolNode; |
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
34 |
class IfNode; |
20289 | 35 |
class Node; |
36 |
||
37 |
class PhaseGVN; |
|
38 |
class PhaseTransform; |
|
39 |
||
40 |
class MathExactNode : public MultiNode { |
|
41 |
public: |
|
21105
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
42 |
MathExactNode(Node* ctrl, Node* in1); |
20289 | 43 |
MathExactNode(Node* ctrl, Node* in1, Node* in2); |
44 |
enum { |
|
45 |
result_proj_node = 0, |
|
46 |
flags_proj_node = 1 |
|
47 |
}; |
|
48 |
virtual int Opcode() const; |
|
49 |
virtual Node* Identity(PhaseTransform* phase) { return this; } |
|
50 |
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape) { return NULL; } |
|
51 |
virtual const Type* Value(PhaseTransform* phase) const { return bottom_type(); } |
|
21578
d380e7e6f805
8028207: assert(_outcnt==1) failed: not unique in compile.cpp
rbackman
parents:
21105
diff
changeset
|
52 |
virtual uint hash() const { return NO_HASH; } |
20289 | 53 |
virtual bool is_CFG() const { return false; } |
54 |
virtual uint ideal_reg() const { return NotAMachineReg; } |
|
55 |
||
20715
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
56 |
ProjNode* result_node() const { return proj_out(result_proj_node); } |
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
57 |
ProjNode* flags_node() const { return proj_out(flags_proj_node); } |
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
58 |
Node* control_node() const; |
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
59 |
Node* non_throwing_branch() const; |
20289 | 60 |
protected: |
20715
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
61 |
IfNode* if_node() const; |
be1135dc1406
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
20289
diff
changeset
|
62 |
BoolNode* bool_node() const; |
20289 | 63 |
Node* no_overflow(PhaseGVN *phase, Node* new_result); |
64 |
}; |
|
65 |
||
21105
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
66 |
class MathExactINode : public MathExactNode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
67 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
68 |
MathExactINode(Node* ctrl, Node* in1) : MathExactNode(ctrl, in1) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
69 |
MathExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactNode(ctrl, in1, in2) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
70 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
71 |
virtual Node* match(const ProjNode* proj, const Matcher* m); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
72 |
virtual const Type* bottom_type() const { return TypeTuple::INT_CC_PAIR; } |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
73 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
74 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
75 |
class MathExactLNode : public MathExactNode { |
20289 | 76 |
public: |
21105
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
77 |
MathExactLNode(Node* ctrl, Node* in1) : MathExactNode(ctrl, in1) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
78 |
MathExactLNode(Node* ctrl, Node* in1, Node* in2) : MathExactNode(ctrl, in1, in2) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
79 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
80 |
virtual Node* match(const ProjNode* proj, const Matcher* m); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
81 |
virtual const Type* bottom_type() const { return TypeTuple::LONG_CC_PAIR; } |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
82 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
83 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
84 |
class AddExactINode : public MathExactINode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
85 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
86 |
AddExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactINode(ctrl, in1, in2) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
87 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
88 |
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
89 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
90 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
91 |
class AddExactLNode : public MathExactLNode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
92 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
93 |
AddExactLNode(Node* ctrl, Node* in1, Node* in2) : MathExactLNode(ctrl, in1, in2) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
94 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
95 |
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
96 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
97 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
98 |
class SubExactINode : public MathExactINode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
99 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
100 |
SubExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactINode(ctrl, in1, in2) {} |
20289 | 101 |
virtual int Opcode() const; |
21105
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
102 |
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
103 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
104 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
105 |
class SubExactLNode : public MathExactLNode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
106 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
107 |
SubExactLNode(Node* ctrl, Node* in1, Node* in2) : MathExactLNode(ctrl, in1, in2) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
108 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
109 |
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
110 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
111 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
112 |
class NegExactINode : public MathExactINode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
113 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
114 |
NegExactINode(Node* ctrl, Node* in1) : MathExactINode(ctrl, in1) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
115 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
116 |
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
117 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
118 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
119 |
class NegExactLNode : public MathExactLNode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
120 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
121 |
NegExactLNode(Node* ctrl, Node* in1) : MathExactLNode(ctrl, in1) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
122 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
123 |
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
124 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
125 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
126 |
class MulExactINode : public MathExactINode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
127 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
128 |
MulExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactINode(ctrl, in1, in2) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
129 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
130 |
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
131 |
}; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
132 |
|
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
133 |
class MulExactLNode : public MathExactLNode { |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
134 |
public: |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
135 |
MulExactLNode(Node* ctrl, Node* in1, Node* in2) : MathExactLNode(ctrl, in1, in2) {} |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
136 |
virtual int Opcode() const; |
47618ee96ed5
8026844: Various Math functions needs intrinsification
rbackman
parents:
20715
diff
changeset
|
137 |
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
20289 | 138 |
}; |
139 |
||
140 |
class FlagsProjNode : public ProjNode { |
|
141 |
public: |
|
142 |
FlagsProjNode(Node* src, uint con) : ProjNode(src, con) { |
|
143 |
init_class_id(Class_FlagsProj); |
|
144 |
} |
|
145 |
||
146 |
virtual int Opcode() const; |
|
147 |
virtual bool is_CFG() const { return false; } |
|
148 |
virtual const Type* bottom_type() const { return TypeInt::CC; } |
|
149 |
virtual uint ideal_reg() const { return Op_RegFlags; } |
|
150 |
}; |
|
151 |
||
152 |
||
153 |
#endif |
|
154 |