comparison src/share/vm/opto/superword.hpp @ 17386:538cbc117324

Fix Windows compile error around OrderedPair in superword.hpp (C2 change!)
author Christian Wirth <christian.wirth@oracle.com>
date Thu, 09 Oct 2014 13:19:11 +0200
parents 4ca6dc0799b6
children 89152779163c
comparison
equal deleted inserted replaced
17379:21015ffe0a1e 17386:538cbc117324
197 const Type* _velt_type; // vector element type 197 const Type* _velt_type; // vector element type
198 Node_List* _my_pack; // pack containing this node 198 Node_List* _my_pack; // pack containing this node
199 199
200 SWNodeInfo() : _alignment(-1), _depth(0), _velt_type(NULL), _my_pack(NULL) {} 200 SWNodeInfo() : _alignment(-1), _depth(0), _velt_type(NULL), _my_pack(NULL) {}
201 static const SWNodeInfo initial; 201 static const SWNodeInfo initial;
202 };
203
204 //------------------------------OrderedPair---------------------------
205 // Ordered pair of Node*.
206 class OrderedPair VALUE_OBJ_CLASS_SPEC {
207 protected:
208 Node* _p1;
209 Node* _p2;
210 public:
211 OrderedPair() : _p1(NULL), _p2(NULL) {}
212 OrderedPair(Node* p1, Node* p2) {
213 if (p1->_idx < p2->_idx) {
214 _p1 = p1; _p2 = p2;
215 } else {
216 _p1 = p2; _p2 = p1;
217 }
218 }
219
220 bool operator==(const OrderedPair &rhs) {
221 return _p1 == rhs._p1 && _p2 == rhs._p2;
222 }
223 void print() { tty->print(" (%d, %d)", _p1->_idx, _p2->_idx); }
224
225 static const OrderedPair initial;
202 }; 226 };
203 227
204 // -----------------------------SuperWord--------------------------------- 228 // -----------------------------SuperWord---------------------------------
205 // Transforms scalar operations into packed (superword) operations. 229 // Transforms scalar operations into packed (superword) operations.
206 class SuperWord : public ResourceObj { 230 class SuperWord : public ResourceObj {
502 static bool comparable(int cmp) { return cmp < NotComparable; } 526 static bool comparable(int cmp) { return cmp < NotComparable; }
503 527
504 void print(); 528 void print();
505 }; 529 };
506 530
507
508 //------------------------------OrderedPair---------------------------
509 // Ordered pair of Node*.
510 class OrderedPair VALUE_OBJ_CLASS_SPEC {
511 protected:
512 Node* _p1;
513 Node* _p2;
514 public:
515 OrderedPair() : _p1(NULL), _p2(NULL) {}
516 OrderedPair(Node* p1, Node* p2) {
517 if (p1->_idx < p2->_idx) {
518 _p1 = p1; _p2 = p2;
519 } else {
520 _p1 = p2; _p2 = p1;
521 }
522 }
523
524 bool operator==(const OrderedPair &rhs) {
525 return _p1 == rhs._p1 && _p2 == rhs._p2;
526 }
527 void print() { tty->print(" (%d, %d)", _p1->_idx, _p2->_idx); }
528
529 static const OrderedPair initial;
530 };
531
532 #endif // SHARE_VM_OPTO_SUPERWORD_HPP 531 #endif // SHARE_VM_OPTO_SUPERWORD_HPP