Mercurial > hg > graal-compiler
annotate src/share/vm/opto/mathexactnode.hpp @ 14562:45812e05cdb3
Move narrow oop handling in reference maps to hotspot specific code.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Mon, 17 Mar 2014 12:07:49 +0100 |
parents | cd5d10655495 |
children | 4ca6dc0799b6 |
rev | line source |
---|---|
12323 | 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" | |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
30 #include "opto/addnode.hpp" |
12888
4a2acfb16e97
8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
rbackman
parents:
12323
diff
changeset
|
31 #include "opto/subnode.hpp" |
12323 | 32 #include "opto/type.hpp" |
33 | |
34 class PhaseGVN; | |
35 class PhaseTransform; | |
36 | |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
37 class OverflowNode : public CmpNode { |
12323 | 38 public: |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
39 OverflowNode(Node* in1, Node* in2) : CmpNode(in1, in2) {} |
12323 | 40 |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
41 virtual uint ideal_reg() const { return Op_RegFlags; } |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
42 virtual const Type* sub(const Type* t1, const Type* t2) const; |
12972
59e8ad757e19
8026844: Various Math functions needs intrinsification
rbackman
parents:
12888
diff
changeset
|
43 }; |
59e8ad757e19
8026844: Various Math functions needs intrinsification
rbackman
parents:
12888
diff
changeset
|
44 |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
45 class OverflowINode : public OverflowNode { |
12972
59e8ad757e19
8026844: Various Math functions needs intrinsification
rbackman
parents:
12888
diff
changeset
|
46 public: |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
47 typedef TypeInt TypeClass; |
12972
59e8ad757e19
8026844: Various Math functions needs intrinsification
rbackman
parents:
12888
diff
changeset
|
48 |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
49 OverflowINode(Node* in1, Node* in2) : OverflowNode(in1, in2) {} |
12972
59e8ad757e19
8026844: Various Math functions needs intrinsification
rbackman
parents:
12888
diff
changeset
|
50 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
51 virtual const Type* Value(PhaseTransform* phase) const; |
12323 | 52 |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
53 virtual bool will_overflow(jint v1, jint v2) const = 0; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
54 virtual bool can_overflow(const Type* t1, const Type* t2) const = 0; |
12323 | 55 }; |
56 | |
57 | |
14495
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
58 class OverflowLNode : public OverflowNode { |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
59 public: |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
60 typedef TypeLong TypeClass; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
61 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
62 OverflowLNode(Node* in1, Node* in2) : OverflowNode(in1, in2) {} |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
63 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
64 virtual const Type* Value(PhaseTransform* phase) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
65 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
66 virtual bool will_overflow(jlong v1, jlong v2) const = 0; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
67 virtual bool can_overflow(const Type* t1, const Type* t2) const = 0; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
68 }; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
69 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
70 class OverflowAddINode : public OverflowINode { |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
71 public: |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
72 typedef AddINode MathOp; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
73 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
74 OverflowAddINode(Node* in1, Node* in2) : OverflowINode(in1, in2) {} |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
75 virtual int Opcode() const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
76 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
77 virtual bool will_overflow(jint v1, jint v2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
78 virtual bool can_overflow(const Type* t1, const Type* t2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
79 }; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
80 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
81 class OverflowSubINode : public OverflowINode { |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
82 public: |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
83 typedef SubINode MathOp; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
84 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
85 OverflowSubINode(Node* in1, Node* in2) : OverflowINode(in1, in2) {} |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
86 virtual int Opcode() const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
87 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
88 virtual bool will_overflow(jint v1, jint v2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
89 virtual bool can_overflow(const Type* t1, const Type* t2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
90 }; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
91 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
92 class OverflowMulINode : public OverflowINode { |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
93 public: |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
94 typedef MulINode MathOp; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
95 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
96 OverflowMulINode(Node* in1, Node* in2) : OverflowINode(in1, in2) {} |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
97 virtual int Opcode() const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
98 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
99 virtual bool will_overflow(jint v1, jint v2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
100 virtual bool can_overflow(const Type* t1, const Type* t2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
101 }; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
102 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
103 class OverflowAddLNode : public OverflowLNode { |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
104 public: |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
105 typedef AddLNode MathOp; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
106 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
107 OverflowAddLNode(Node* in1, Node* in2) : OverflowLNode(in1, in2) {} |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
108 virtual int Opcode() const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
109 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
110 virtual bool will_overflow(jlong v1, jlong v2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
111 virtual bool can_overflow(const Type* t1, const Type* t2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
112 }; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
113 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
114 class OverflowSubLNode : public OverflowLNode { |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
115 public: |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
116 typedef SubLNode MathOp; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
117 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
118 OverflowSubLNode(Node* in1, Node* in2) : OverflowLNode(in1, in2) {} |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
119 virtual int Opcode() const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
120 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
121 virtual bool will_overflow(jlong v1, jlong v2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
122 virtual bool can_overflow(const Type* t1, const Type* t2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
123 }; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
124 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
125 class OverflowMulLNode : public OverflowLNode { |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
126 public: |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
127 typedef MulLNode MathOp; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
128 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
129 OverflowMulLNode(Node* in1, Node* in2) : OverflowLNode(in1, in2) {} |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
130 virtual int Opcode() const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
131 |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
132 virtual bool will_overflow(jlong v1, jlong v2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
133 virtual bool can_overflow(const Type* t1, const Type* t2) const; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
134 }; |
cd5d10655495
8027754: Enable loop optimizations for loops with MathExact inside
rbackman
parents:
13077
diff
changeset
|
135 |
12323 | 136 #endif |
137 |