Mercurial > hg > graal-compiler
comparison src/share/vm/opto/mathexactnode.hpp @ 12972:59e8ad757e19
8026844: Various Math functions needs intrinsification
Reviewed-by: kvn, twisti
author | rbackman |
---|---|
date | Fri, 18 Oct 2013 10:41:56 +0200 |
parents | 4a2acfb16e97 |
children | b957c650babb |
comparison
equal
deleted
inserted
replaced
12971:3a04e444da6d | 12972:59e8ad757e19 |
---|---|
37 class PhaseGVN; | 37 class PhaseGVN; |
38 class PhaseTransform; | 38 class PhaseTransform; |
39 | 39 |
40 class MathExactNode : public MultiNode { | 40 class MathExactNode : public MultiNode { |
41 public: | 41 public: |
42 MathExactNode(Node* ctrl, Node* in1); | |
42 MathExactNode(Node* ctrl, Node* in1, Node* in2); | 43 MathExactNode(Node* ctrl, Node* in1, Node* in2); |
43 enum { | 44 enum { |
44 result_proj_node = 0, | 45 result_proj_node = 0, |
45 flags_proj_node = 1 | 46 flags_proj_node = 1 |
46 }; | 47 }; |
60 IfNode* if_node() const; | 61 IfNode* if_node() const; |
61 BoolNode* bool_node() const; | 62 BoolNode* bool_node() const; |
62 Node* no_overflow(PhaseGVN *phase, Node* new_result); | 63 Node* no_overflow(PhaseGVN *phase, Node* new_result); |
63 }; | 64 }; |
64 | 65 |
65 class AddExactINode : public MathExactNode { | 66 class MathExactINode : public MathExactNode { |
67 public: | |
68 MathExactINode(Node* ctrl, Node* in1) : MathExactNode(ctrl, in1) {} | |
69 MathExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactNode(ctrl, in1, in2) {} | |
70 virtual int Opcode() const; | |
71 virtual Node* match(const ProjNode* proj, const Matcher* m); | |
72 virtual const Type* bottom_type() const { return TypeTuple::INT_CC_PAIR; } | |
73 }; | |
74 | |
75 class MathExactLNode : public MathExactNode { | |
66 public: | 76 public: |
67 AddExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactNode(ctrl, in1, in2) {} | 77 MathExactLNode(Node* ctrl, Node* in1) : MathExactNode(ctrl, in1) {} |
78 MathExactLNode(Node* ctrl, Node* in1, Node* in2) : MathExactNode(ctrl, in1, in2) {} | |
68 virtual int Opcode() const; | 79 virtual int Opcode() const; |
69 virtual const Type* bottom_type() const { return TypeTuple::INT_CC_PAIR; } | |
70 virtual Node* match(const ProjNode* proj, const Matcher* m); | 80 virtual Node* match(const ProjNode* proj, const Matcher* m); |
81 virtual const Type* bottom_type() const { return TypeTuple::LONG_CC_PAIR; } | |
82 }; | |
83 | |
84 class AddExactINode : public MathExactINode { | |
85 public: | |
86 AddExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactINode(ctrl, in1, in2) {} | |
87 virtual int Opcode() const; | |
71 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | 88 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
89 }; | |
90 | |
91 class AddExactLNode : public MathExactLNode { | |
92 public: | |
93 AddExactLNode(Node* ctrl, Node* in1, Node* in2) : MathExactLNode(ctrl, in1, in2) {} | |
94 virtual int Opcode() const; | |
95 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); | |
96 }; | |
97 | |
98 class SubExactINode : public MathExactINode { | |
99 public: | |
100 SubExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactINode(ctrl, in1, in2) {} | |
101 virtual int Opcode() const; | |
102 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); | |
103 }; | |
104 | |
105 class SubExactLNode : public MathExactLNode { | |
106 public: | |
107 SubExactLNode(Node* ctrl, Node* in1, Node* in2) : MathExactLNode(ctrl, in1, in2) {} | |
108 virtual int Opcode() const; | |
109 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); | |
110 }; | |
111 | |
112 class NegExactINode : public MathExactINode { | |
113 public: | |
114 NegExactINode(Node* ctrl, Node* in1) : MathExactINode(ctrl, in1) {} | |
115 virtual int Opcode() const; | |
116 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); | |
117 }; | |
118 | |
119 class NegExactLNode : public MathExactLNode { | |
120 public: | |
121 NegExactLNode(Node* ctrl, Node* in1) : MathExactLNode(ctrl, in1) {} | |
122 virtual int Opcode() const; | |
123 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); | |
124 }; | |
125 | |
126 class MulExactINode : public MathExactINode { | |
127 public: | |
128 MulExactINode(Node* ctrl, Node* in1, Node* in2) : MathExactINode(ctrl, in1, in2) {} | |
129 virtual int Opcode() const; | |
130 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); | |
131 }; | |
132 | |
133 class MulExactLNode : public MathExactLNode { | |
134 public: | |
135 MulExactLNode(Node* ctrl, Node* in1, Node* in2) : MathExactLNode(ctrl, in1, in2) {} | |
136 virtual int Opcode() const; | |
137 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); | |
72 }; | 138 }; |
73 | 139 |
74 class FlagsProjNode : public ProjNode { | 140 class FlagsProjNode : public ProjNode { |
75 public: | 141 public: |
76 FlagsProjNode(Node* src, uint con) : ProjNode(src, con) { | 142 FlagsProjNode(Node* src, uint con) : ProjNode(src, con) { |