Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/node.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | cd5d10655495 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
67 class EncodeNarrowPtrNode; | 67 class EncodeNarrowPtrNode; |
68 class EncodePNode; | 68 class EncodePNode; |
69 class EncodePKlassNode; | 69 class EncodePKlassNode; |
70 class FastLockNode; | 70 class FastLockNode; |
71 class FastUnlockNode; | 71 class FastUnlockNode; |
72 class FlagsProjNode; | |
72 class IfNode; | 73 class IfNode; |
73 class IfFalseNode; | 74 class IfFalseNode; |
74 class IfTrueNode; | 75 class IfTrueNode; |
75 class InitializeNode; | 76 class InitializeNode; |
76 class JVMState; | 77 class JVMState; |
97 class MachReturnNode; | 98 class MachReturnNode; |
98 class MachSafePointNode; | 99 class MachSafePointNode; |
99 class MachSpillCopyNode; | 100 class MachSpillCopyNode; |
100 class MachTempNode; | 101 class MachTempNode; |
101 class Matcher; | 102 class Matcher; |
103 class MathExactNode; | |
102 class MemBarNode; | 104 class MemBarNode; |
103 class MemBarStoreStoreNode; | 105 class MemBarStoreStoreNode; |
104 class MemNode; | 106 class MemNode; |
105 class MergeMemNode; | 107 class MergeMemNode; |
106 class MulNode; | 108 class MulNode; |
353 Node* last_out(DUIterator_Last i) const { return *i; } | 355 Node* last_out(DUIterator_Last i) const { return *i; } |
354 #endif | 356 #endif |
355 | 357 |
356 // Reference to the i'th input Node. Error if out of bounds. | 358 // Reference to the i'th input Node. Error if out of bounds. |
357 Node* in(uint i) const { assert(i < _max, err_msg_res("oob: i=%d, _max=%d", i, _max)); return _in[i]; } | 359 Node* in(uint i) const { assert(i < _max, err_msg_res("oob: i=%d, _max=%d", i, _max)); return _in[i]; } |
358 // Reference to the i'th input Node. NULL if out of bounds. | |
359 Node* lookup(uint i) const { return ((i < _max) ? _in[i] : NULL); } | |
360 // Reference to the i'th output Node. Error if out of bounds. | 360 // Reference to the i'th output Node. Error if out of bounds. |
361 // Use this accessor sparingly. We are going trying to use iterators instead. | 361 // Use this accessor sparingly. We are going trying to use iterators instead. |
362 Node* raw_out(uint i) const { assert(i < _outcnt,"oob"); return _out[i]; } | 362 Node* raw_out(uint i) const { assert(i < _outcnt,"oob"); return _out[i]; } |
363 // Return the unique out edge. | 363 // Return the unique out edge. |
364 Node* unique_out() const { assert(_outcnt==1,"not unique"); return _out[0]; } | 364 Node* unique_out() const { assert(_outcnt==1,"not unique"); return _out[0]; } |
382 // Check whether node has become unreachable | 382 // Check whether node has become unreachable |
383 bool is_unreachable(PhaseIterGVN &igvn) const; | 383 bool is_unreachable(PhaseIterGVN &igvn) const; |
384 | 384 |
385 // Set a required input edge, also updates corresponding output edge | 385 // Set a required input edge, also updates corresponding output edge |
386 void add_req( Node *n ); // Append a NEW required input | 386 void add_req( Node *n ); // Append a NEW required input |
387 void add_req( Node *n0, Node *n1 ) { | |
388 add_req(n0); add_req(n1); } | |
389 void add_req( Node *n0, Node *n1, Node *n2 ) { | |
390 add_req(n0); add_req(n1); add_req(n2); } | |
391 void add_req_batch( Node* n, uint m ); // Append m NEW required inputs (all n). | 387 void add_req_batch( Node* n, uint m ); // Append m NEW required inputs (all n). |
392 void del_req( uint idx ); // Delete required edge & compact | 388 void del_req( uint idx ); // Delete required edge & compact |
393 void del_req_ordered( uint idx ); // Delete required edge & compact with preserved order | 389 void del_req_ordered( uint idx ); // Delete required edge & compact with preserved order |
394 void ins_req( uint i, Node *n ); // Insert a NEW required input | 390 void ins_req( uint i, Node *n ); // Insert a NEW required input |
395 void set_req( uint i, Node *n ) { | 391 void set_req( uint i, Node *n ) { |
571 DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2) | 567 DEFINE_CLASS_ID(NeverBranch, MultiBranch, 2) |
572 DEFINE_CLASS_ID(Start, Multi, 2) | 568 DEFINE_CLASS_ID(Start, Multi, 2) |
573 DEFINE_CLASS_ID(MemBar, Multi, 3) | 569 DEFINE_CLASS_ID(MemBar, Multi, 3) |
574 DEFINE_CLASS_ID(Initialize, MemBar, 0) | 570 DEFINE_CLASS_ID(Initialize, MemBar, 0) |
575 DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1) | 571 DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1) |
572 DEFINE_CLASS_ID(MathExact, Multi, 4) | |
576 | 573 |
577 DEFINE_CLASS_ID(Mach, Node, 1) | 574 DEFINE_CLASS_ID(Mach, Node, 1) |
578 DEFINE_CLASS_ID(MachReturn, Mach, 0) | 575 DEFINE_CLASS_ID(MachReturn, Mach, 0) |
579 DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0) | 576 DEFINE_CLASS_ID(MachSafePoint, MachReturn, 0) |
580 DEFINE_CLASS_ID(MachCall, MachSafePoint, 0) | 577 DEFINE_CLASS_ID(MachCall, MachSafePoint, 0) |
627 | 624 |
628 DEFINE_CLASS_ID(Sub, Node, 6) | 625 DEFINE_CLASS_ID(Sub, Node, 6) |
629 DEFINE_CLASS_ID(Cmp, Sub, 0) | 626 DEFINE_CLASS_ID(Cmp, Sub, 0) |
630 DEFINE_CLASS_ID(FastLock, Cmp, 0) | 627 DEFINE_CLASS_ID(FastLock, Cmp, 0) |
631 DEFINE_CLASS_ID(FastUnlock, Cmp, 1) | 628 DEFINE_CLASS_ID(FastUnlock, Cmp, 1) |
629 DEFINE_CLASS_ID(FlagsProj, Cmp, 2) | |
632 | 630 |
633 DEFINE_CLASS_ID(MergeMem, Node, 7) | 631 DEFINE_CLASS_ID(MergeMem, Node, 7) |
634 DEFINE_CLASS_ID(Bool, Node, 8) | 632 DEFINE_CLASS_ID(Bool, Node, 8) |
635 DEFINE_CLASS_ID(AddP, Node, 9) | 633 DEFINE_CLASS_ID(AddP, Node, 9) |
636 DEFINE_CLASS_ID(BoxLock, Node, 10) | 634 DEFINE_CLASS_ID(BoxLock, Node, 10) |
730 DEFINE_CLASS_QUERY(EncodeNarrowPtr) | 728 DEFINE_CLASS_QUERY(EncodeNarrowPtr) |
731 DEFINE_CLASS_QUERY(EncodeP) | 729 DEFINE_CLASS_QUERY(EncodeP) |
732 DEFINE_CLASS_QUERY(EncodePKlass) | 730 DEFINE_CLASS_QUERY(EncodePKlass) |
733 DEFINE_CLASS_QUERY(FastLock) | 731 DEFINE_CLASS_QUERY(FastLock) |
734 DEFINE_CLASS_QUERY(FastUnlock) | 732 DEFINE_CLASS_QUERY(FastUnlock) |
733 DEFINE_CLASS_QUERY(FlagsProj) | |
735 DEFINE_CLASS_QUERY(If) | 734 DEFINE_CLASS_QUERY(If) |
736 DEFINE_CLASS_QUERY(IfFalse) | 735 DEFINE_CLASS_QUERY(IfFalse) |
737 DEFINE_CLASS_QUERY(IfTrue) | 736 DEFINE_CLASS_QUERY(IfTrue) |
738 DEFINE_CLASS_QUERY(Initialize) | 737 DEFINE_CLASS_QUERY(Initialize) |
739 DEFINE_CLASS_QUERY(Jump) | 738 DEFINE_CLASS_QUERY(Jump) |
758 DEFINE_CLASS_QUERY(MachProj) | 757 DEFINE_CLASS_QUERY(MachProj) |
759 DEFINE_CLASS_QUERY(MachReturn) | 758 DEFINE_CLASS_QUERY(MachReturn) |
760 DEFINE_CLASS_QUERY(MachSafePoint) | 759 DEFINE_CLASS_QUERY(MachSafePoint) |
761 DEFINE_CLASS_QUERY(MachSpillCopy) | 760 DEFINE_CLASS_QUERY(MachSpillCopy) |
762 DEFINE_CLASS_QUERY(MachTemp) | 761 DEFINE_CLASS_QUERY(MachTemp) |
762 DEFINE_CLASS_QUERY(MathExact) | |
763 DEFINE_CLASS_QUERY(Mem) | 763 DEFINE_CLASS_QUERY(Mem) |
764 DEFINE_CLASS_QUERY(MemBar) | 764 DEFINE_CLASS_QUERY(MemBar) |
765 DEFINE_CLASS_QUERY(MemBarStoreStore) | 765 DEFINE_CLASS_QUERY(MemBarStoreStore) |
766 DEFINE_CLASS_QUERY(MergeMem) | 766 DEFINE_CLASS_QUERY(MergeMem) |
767 DEFINE_CLASS_QUERY(Mul) | 767 DEFINE_CLASS_QUERY(Mul) |
1025 | 1025 |
1026 void dump_format(PhaseRegAlloc *ra) const; // debug access to MachNode::format(...) | 1026 void dump_format(PhaseRegAlloc *ra) const; // debug access to MachNode::format(...) |
1027 // RegMask Print Functions | 1027 // RegMask Print Functions |
1028 void dump_in_regmask(int idx) { in_RegMask(idx).dump(); } | 1028 void dump_in_regmask(int idx) { in_RegMask(idx).dump(); } |
1029 void dump_out_regmask() { out_RegMask().dump(); } | 1029 void dump_out_regmask() { out_RegMask().dump(); } |
1030 static bool in_dump() { return Compile::current()->_in_dump_cnt > 0; } | 1030 static int _in_dump_cnt; |
1031 static bool in_dump() { return _in_dump_cnt > 0; } | |
1031 void fast_dump() const { | 1032 void fast_dump() const { |
1032 tty->print("%4d: %-17s", _idx, Name()); | 1033 tty->print("%4d: %-17s", _idx, Name()); |
1033 for (uint i = 0; i < len(); i++) | 1034 for (uint i = 0; i < len(); i++) |
1034 if (in(i)) | 1035 if (in(i)) |
1035 tty->print(" %4d", in(i)->_idx); | 1036 tty->print(" %4d", in(i)->_idx); |
1347 friend class VMStructs; | 1348 friend class VMStructs; |
1348 uint _cnt; | 1349 uint _cnt; |
1349 public: | 1350 public: |
1350 Node_List() : Node_Array(Thread::current()->resource_area()), _cnt(0) {} | 1351 Node_List() : Node_Array(Thread::current()->resource_area()), _cnt(0) {} |
1351 Node_List(Arena *a) : Node_Array(a), _cnt(0) {} | 1352 Node_List(Arena *a) : Node_Array(a), _cnt(0) {} |
1352 bool contains(const Node* n) const { | 1353 bool contains(Node* n) { |
1353 for (uint e = 0; e < size(); e++) { | 1354 for (uint e = 0; e < size(); e++) { |
1354 if (at(e) == n) return true; | 1355 if (at(e) == n) return true; |
1355 } | 1356 } |
1356 return false; | 1357 return false; |
1357 } | 1358 } |