comparison hotspot/src/share/vm/opto/graphKit.hpp @ 24923:9631f7d691dc

8034812: remove IDX_INIT macro hack in Node class Summary: The IDX_INIT macro used by Node::Node(...) to retrieve the Compile object is removed and replaced by a call to Compile::current(). The Node constructor, new operator and all calls to it are adapted accordingly. Reviewed-by: kvn, jrose, iveresov, goetz
author thartmann
date Mon, 02 Jun 2014 08:07:29 +0200
parents e3eb08ead679
children 6df48e563632
comparison
equal deleted inserted replaced
37:397c8d3c01f7 38:82d18cd8bd87
307 } 307 }
308 Node* basic_plus_adr(Node* base, Node* ptr, Node* offset); 308 Node* basic_plus_adr(Node* base, Node* ptr, Node* offset);
309 309
310 310
311 // Some convenient shortcuts for common nodes 311 // Some convenient shortcuts for common nodes
312 Node* IfTrue(IfNode* iff) { return _gvn.transform(new (C) IfTrueNode(iff)); } 312 Node* IfTrue(IfNode* iff) { return _gvn.transform(new IfTrueNode(iff)); }
313 Node* IfFalse(IfNode* iff) { return _gvn.transform(new (C) IfFalseNode(iff)); } 313 Node* IfFalse(IfNode* iff) { return _gvn.transform(new IfFalseNode(iff)); }
314 314
315 Node* AddI(Node* l, Node* r) { return _gvn.transform(new (C) AddINode(l, r)); } 315 Node* AddI(Node* l, Node* r) { return _gvn.transform(new AddINode(l, r)); }
316 Node* SubI(Node* l, Node* r) { return _gvn.transform(new (C) SubINode(l, r)); } 316 Node* SubI(Node* l, Node* r) { return _gvn.transform(new SubINode(l, r)); }
317 Node* MulI(Node* l, Node* r) { return _gvn.transform(new (C) MulINode(l, r)); } 317 Node* MulI(Node* l, Node* r) { return _gvn.transform(new MulINode(l, r)); }
318 Node* DivI(Node* ctl, Node* l, Node* r) { return _gvn.transform(new (C) DivINode(ctl, l, r)); } 318 Node* DivI(Node* ctl, Node* l, Node* r) { return _gvn.transform(new DivINode(ctl, l, r)); }
319 319
320 Node* AndI(Node* l, Node* r) { return _gvn.transform(new (C) AndINode(l, r)); } 320 Node* AndI(Node* l, Node* r) { return _gvn.transform(new AndINode(l, r)); }
321 Node* OrI(Node* l, Node* r) { return _gvn.transform(new (C) OrINode(l, r)); } 321 Node* OrI(Node* l, Node* r) { return _gvn.transform(new OrINode(l, r)); }
322 Node* XorI(Node* l, Node* r) { return _gvn.transform(new (C) XorINode(l, r)); } 322 Node* XorI(Node* l, Node* r) { return _gvn.transform(new XorINode(l, r)); }
323 323
324 Node* MaxI(Node* l, Node* r) { return _gvn.transform(new (C) MaxINode(l, r)); } 324 Node* MaxI(Node* l, Node* r) { return _gvn.transform(new MaxINode(l, r)); }
325 Node* MinI(Node* l, Node* r) { return _gvn.transform(new (C) MinINode(l, r)); } 325 Node* MinI(Node* l, Node* r) { return _gvn.transform(new MinINode(l, r)); }
326 326
327 Node* LShiftI(Node* l, Node* r) { return _gvn.transform(new (C) LShiftINode(l, r)); } 327 Node* LShiftI(Node* l, Node* r) { return _gvn.transform(new LShiftINode(l, r)); }
328 Node* RShiftI(Node* l, Node* r) { return _gvn.transform(new (C) RShiftINode(l, r)); } 328 Node* RShiftI(Node* l, Node* r) { return _gvn.transform(new RShiftINode(l, r)); }
329 Node* URShiftI(Node* l, Node* r) { return _gvn.transform(new (C) URShiftINode(l, r)); } 329 Node* URShiftI(Node* l, Node* r) { return _gvn.transform(new URShiftINode(l, r)); }
330 330
331 Node* CmpI(Node* l, Node* r) { return _gvn.transform(new (C) CmpINode(l, r)); } 331 Node* CmpI(Node* l, Node* r) { return _gvn.transform(new CmpINode(l, r)); }
332 Node* CmpL(Node* l, Node* r) { return _gvn.transform(new (C) CmpLNode(l, r)); } 332 Node* CmpL(Node* l, Node* r) { return _gvn.transform(new CmpLNode(l, r)); }
333 Node* CmpP(Node* l, Node* r) { return _gvn.transform(new (C) CmpPNode(l, r)); } 333 Node* CmpP(Node* l, Node* r) { return _gvn.transform(new CmpPNode(l, r)); }
334 Node* Bool(Node* cmp, BoolTest::mask relop) { return _gvn.transform(new (C) BoolNode(cmp, relop)); } 334 Node* Bool(Node* cmp, BoolTest::mask relop) { return _gvn.transform(new BoolNode(cmp, relop)); }
335 335
336 Node* AddP(Node* b, Node* a, Node* o) { return _gvn.transform(new (C) AddPNode(b, a, o)); } 336 Node* AddP(Node* b, Node* a, Node* o) { return _gvn.transform(new AddPNode(b, a, o)); }
337 337
338 // Convert between int and long, and size_t. 338 // Convert between int and long, and size_t.
339 // (See macros ConvI2X, etc., in type.hpp for ConvI2X, etc.) 339 // (See macros ConvI2X, etc., in type.hpp for ConvI2X, etc.)
340 Node* ConvI2L(Node* offset); 340 Node* ConvI2L(Node* offset);
341 Node* ConvI2UL(Node* offset); 341 Node* ConvI2UL(Node* offset);
865 void store_String_length(Node* ctrl, Node* str, Node* value); 865 void store_String_length(Node* ctrl, Node* str, Node* value);
866 void store_String_value(Node* ctrl, Node* str, Node* value); 866 void store_String_value(Node* ctrl, Node* str, Node* value);
867 867
868 // Handy for making control flow 868 // Handy for making control flow
869 IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) { 869 IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) {
870 IfNode* iff = new (C) IfNode(ctrl, tst, prob, cnt);// New IfNode's 870 IfNode* iff = new IfNode(ctrl, tst, prob, cnt);// New IfNode's
871 _gvn.set_type(iff, iff->Value(&_gvn)); // Value may be known at parse-time 871 _gvn.set_type(iff, iff->Value(&_gvn)); // Value may be known at parse-time
872 // Place 'if' on worklist if it will be in graph 872 // Place 'if' on worklist if it will be in graph
873 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later 873 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later
874 return iff; 874 return iff;
875 } 875 }
876 876
877 IfNode* create_and_xform_if(Node* ctrl, Node* tst, float prob, float cnt) { 877 IfNode* create_and_xform_if(Node* ctrl, Node* tst, float prob, float cnt) {
878 IfNode* iff = new (C) IfNode(ctrl, tst, prob, cnt);// New IfNode's 878 IfNode* iff = new IfNode(ctrl, tst, prob, cnt);// New IfNode's
879 _gvn.transform(iff); // Value may be known at parse-time 879 _gvn.transform(iff); // Value may be known at parse-time
880 // Place 'if' on worklist if it will be in graph 880 // Place 'if' on worklist if it will be in graph
881 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later 881 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later
882 return iff; 882 return iff;
883 } 883 }