1 /*
2 * Copyright (c) 2005, 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 *
166 void else_();
167 void end_if();
168 void loop(GraphKit* gkit, int nargs, IdealVariable& iv, Node* init, BoolTest::mask cmp, Node* limit,
169 float prob = PROB_LIKELY(0.9), float cnt = COUNT_UNKNOWN);
170 void end_loop();
171 Node* make_label(int goto_ct);
172 void bind(Node* lab);
173 void goto_(Node* lab, bool bind = false);
174 void declarations_done();
175
176 Node* IfTrue(IfNode* iff) { return transform(new IfTrueNode(iff)); }
177 Node* IfFalse(IfNode* iff) { return transform(new IfFalseNode(iff)); }
178
179 // Data
180 Node* ConI(jint k) { return (Node*)gvn().intcon(k); }
181 Node* makecon(const Type *t) const { return _gvn.makecon(t); }
182
183 Node* AddI(Node* l, Node* r) { return transform(new AddINode(l, r)); }
184 Node* SubI(Node* l, Node* r) { return transform(new SubINode(l, r)); }
185 Node* AndI(Node* l, Node* r) { return transform(new AndINode(l, r)); }
186 Node* MaxI(Node* l, Node* r) { return transform(new MaxINode(l, r)); }
187 Node* LShiftI(Node* l, Node* r) { return transform(new LShiftINode(l, r)); }
188 Node* CmpI(Node* l, Node* r) { return transform(new CmpINode(l, r)); }
189 Node* Bool(Node* cmp, BoolTest::mask relop) { return transform(new BoolNode(cmp, relop)); }
190 void increment(IdealVariable& v, Node* j) { set(v, AddI(value(v), j)); }
191 void decrement(IdealVariable& v, Node* j) { set(v, SubI(value(v), j)); }
192
193 Node* CmpL(Node* l, Node* r) { return transform(new CmpLNode(l, r)); }
194
195 // TLS
196 Node* thread() { return gvn().transform(new ThreadLocalNode()); }
197
198 // Pointers
199
200 // Raw address should be transformed regardless 'delay_transform' flag
201 // to produce canonical form CastX2P(offset).
202 Node* AddP(Node *base, Node *ptr, Node *off) { return _gvn.transform(new AddPNode(base, ptr, off)); }
203
204 Node* CmpP(Node* l, Node* r) { return transform(new CmpPNode(l, r)); }
205 #ifdef _LP64
239 BasicType bt,
240 int adr_idx);
241
242 // Trivial call
243 void make_leaf_call(const TypeFunc *slow_call_type,
244 address slow_call,
245 const char *leaf_name,
246 Node* parm0,
247 Node* parm1 = NULL,
248 Node* parm2 = NULL,
249 Node* parm3 = NULL);
250
251 void make_leaf_call_no_fp(const TypeFunc *slow_call_type,
252 address slow_call,
253 const char *leaf_name,
254 const TypePtr* adr_type,
255 Node* parm0,
256 Node* parm1,
257 Node* parm2,
258 Node* parm3);
259
260 };
261
262 #endif // SHARE_VM_OPTO_IDEALKIT_HPP
|
1 /*
2 * Copyright (c) 2005, 2015, 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 *
166 void else_();
167 void end_if();
168 void loop(GraphKit* gkit, int nargs, IdealVariable& iv, Node* init, BoolTest::mask cmp, Node* limit,
169 float prob = PROB_LIKELY(0.9), float cnt = COUNT_UNKNOWN);
170 void end_loop();
171 Node* make_label(int goto_ct);
172 void bind(Node* lab);
173 void goto_(Node* lab, bool bind = false);
174 void declarations_done();
175
176 Node* IfTrue(IfNode* iff) { return transform(new IfTrueNode(iff)); }
177 Node* IfFalse(IfNode* iff) { return transform(new IfFalseNode(iff)); }
178
179 // Data
180 Node* ConI(jint k) { return (Node*)gvn().intcon(k); }
181 Node* makecon(const Type *t) const { return _gvn.makecon(t); }
182
183 Node* AddI(Node* l, Node* r) { return transform(new AddINode(l, r)); }
184 Node* SubI(Node* l, Node* r) { return transform(new SubINode(l, r)); }
185 Node* AndI(Node* l, Node* r) { return transform(new AndINode(l, r)); }
186 Node* OrI(Node* l, Node* r) { return transform(new OrINode(l, r)); }
187 Node* MaxI(Node* l, Node* r) { return transform(new MaxINode(l, r)); }
188 Node* LShiftI(Node* l, Node* r) { return transform(new LShiftINode(l, r)); }
189 Node* CmpI(Node* l, Node* r) { return transform(new CmpINode(l, r)); }
190 Node* Bool(Node* cmp, BoolTest::mask relop) { return transform(new BoolNode(cmp, relop)); }
191 void increment(IdealVariable& v, Node* j) { set(v, AddI(value(v), j)); }
192 void decrement(IdealVariable& v, Node* j) { set(v, SubI(value(v), j)); }
193
194 Node* CmpL(Node* l, Node* r) { return transform(new CmpLNode(l, r)); }
195
196 // TLS
197 Node* thread() { return gvn().transform(new ThreadLocalNode()); }
198
199 // Pointers
200
201 // Raw address should be transformed regardless 'delay_transform' flag
202 // to produce canonical form CastX2P(offset).
203 Node* AddP(Node *base, Node *ptr, Node *off) { return _gvn.transform(new AddPNode(base, ptr, off)); }
204
205 Node* CmpP(Node* l, Node* r) { return transform(new CmpPNode(l, r)); }
206 #ifdef _LP64
240 BasicType bt,
241 int adr_idx);
242
243 // Trivial call
244 void make_leaf_call(const TypeFunc *slow_call_type,
245 address slow_call,
246 const char *leaf_name,
247 Node* parm0,
248 Node* parm1 = NULL,
249 Node* parm2 = NULL,
250 Node* parm3 = NULL);
251
252 void make_leaf_call_no_fp(const TypeFunc *slow_call_type,
253 address slow_call,
254 const char *leaf_name,
255 const TypePtr* adr_type,
256 Node* parm0,
257 Node* parm1,
258 Node* parm2,
259 Node* parm3);
260 };
261
262 #endif // SHARE_VM_OPTO_IDEALKIT_HPP
|