src/share/vm/opto/superword.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6852078 Sdiff src/share/vm/opto

src/share/vm/opto/superword.cpp

Print this page




1904   for (uint i = 0; i < depth; i++) blanks[i] = ' ';
1905   blanks[depth] = '\0';
1906   return blanks;
1907 }
1908 
1909 
1910 //==============================SWPointer===========================
1911 
1912 //----------------------------SWPointer------------------------
1913 SWPointer::SWPointer(MemNode* mem, SuperWord* slp) :
1914   _mem(mem), _slp(slp),  _base(NULL),  _adr(NULL),
1915   _scale(0), _offset(0), _invar(NULL), _negate_invar(false) {
1916 
1917   Node* adr = mem->in(MemNode::Address);
1918   if (!adr->is_AddP()) {
1919     assert(!valid(), "too complex");
1920     return;
1921   }
1922   // Match AddP(base, AddP(ptr, k*iv [+ invariant]), constant)
1923   Node* base = adr->in(AddPNode::Base);





1924   for (int i = 0; i < 3; i++) {
1925     if (!scaled_iv_plus_offset(adr->in(AddPNode::Offset))) {
1926       assert(!valid(), "too complex");
1927       return;
1928     }
1929     adr = adr->in(AddPNode::Address);
1930     if (base == adr || !adr->is_AddP()) {
1931       break; // stop looking at addp's
1932     }
1933   }
1934   _base = base;
1935   _adr  = adr;
1936   assert(valid(), "Usable");
1937 }
1938 
1939 // Following is used to create a temporary object during
1940 // the pattern match of an address expression.
1941 SWPointer::SWPointer(SWPointer* p) :
1942   _mem(p->_mem), _slp(p->_slp),  _base(NULL),  _adr(NULL),
1943   _scale(0), _offset(0), _invar(NULL), _negate_invar(false) {}




1904   for (uint i = 0; i < depth; i++) blanks[i] = ' ';
1905   blanks[depth] = '\0';
1906   return blanks;
1907 }
1908 
1909 
1910 //==============================SWPointer===========================
1911 
1912 //----------------------------SWPointer------------------------
1913 SWPointer::SWPointer(MemNode* mem, SuperWord* slp) :
1914   _mem(mem), _slp(slp),  _base(NULL),  _adr(NULL),
1915   _scale(0), _offset(0), _invar(NULL), _negate_invar(false) {
1916 
1917   Node* adr = mem->in(MemNode::Address);
1918   if (!adr->is_AddP()) {
1919     assert(!valid(), "too complex");
1920     return;
1921   }
1922   // Match AddP(base, AddP(ptr, k*iv [+ invariant]), constant)
1923   Node* base = adr->in(AddPNode::Base);
1924   //unsafe reference could not be aligned appropriately without runtime checking
1925   if (base == NULL || base->bottom_type() == Type::TOP) {
1926     assert(!valid(), "unsafe access");
1927     return;
1928   }
1929   for (int i = 0; i < 3; i++) {
1930     if (!scaled_iv_plus_offset(adr->in(AddPNode::Offset))) {
1931       assert(!valid(), "too complex");
1932       return;
1933     }
1934     adr = adr->in(AddPNode::Address);
1935     if (base == adr || !adr->is_AddP()) {
1936       break; // stop looking at addp's
1937     }
1938   }
1939   _base = base;
1940   _adr  = adr;
1941   assert(valid(), "Usable");
1942 }
1943 
1944 // Following is used to create a temporary object during
1945 // the pattern match of an address expression.
1946 SWPointer::SWPointer(SWPointer* p) :
1947   _mem(p->_mem), _slp(p->_slp),  _base(NULL),  _adr(NULL),
1948   _scale(0), _offset(0), _invar(NULL), _negate_invar(false) {}


src/share/vm/opto/superword.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File