src/share/vm/opto/connode.cpp

changeset 471
f34d9da7acb2
parent 435
a61af66fc99e
child 548
ba764ed4b6f2
equal deleted inserted replaced
470:e2ae28d2ce91 471:f34d9da7acb2
980 Node *add1 = phase->transform(new (phase->C, 2) ConvL2INode(x)); 980 Node *add1 = phase->transform(new (phase->C, 2) ConvL2INode(x));
981 Node *add2 = phase->transform(new (phase->C, 2) ConvL2INode(y)); 981 Node *add2 = phase->transform(new (phase->C, 2) ConvL2INode(y));
982 return new (phase->C, 3) AddINode(add1,add2); 982 return new (phase->C, 3) AddINode(add1,add2);
983 } 983 }
984 984
985 // Fold up with a prior LoadL: LoadL->ConvL2I ==> LoadI 985 // Disable optimization: LoadL->ConvL2I ==> LoadI.
986 // Requires we understand the 'endianess' of Longs. 986 // It causes problems (sizes of Load and Store nodes do not match)
987 if( andl_op == Op_LoadL ) { 987 // in objects initialization code and Escape Analysis.
988 Node *adr = andl->in(MemNode::Address);
989 // VM_LITTLE_ENDIAN is #defined appropriately in the Makefiles
990 #ifndef VM_LITTLE_ENDIAN
991 // The transformation can cause problems on BIG_ENDIAN architectures
992 // where the jint is not the same address as the jlong. Specifically, we
993 // will fail to insert an anti-dependence in GCM between the LoadI and a
994 // subsequent StoreL because different memory offsets provoke
995 // flatten_alias_type() into indicating two different types. See bug
996 // 4755222.
997
998 // Node *base = adr->is_AddP() ? adr->in(AddPNode::Base) : adr;
999 // adr = phase->transform( new (phase->C, 4) AddPNode(base,adr,phase->MakeConX(sizeof(jint))));
1000 return NULL;
1001 #else
1002 if (phase->C->alias_type(andl->adr_type())->is_volatile()) {
1003 // Picking up the low half by itself bypasses the atomic load and we could
1004 // end up with more than one non-atomic load. See bugs 4432655 and 4526490.
1005 // We could go to the trouble of iterating over andl's output edges and
1006 // punting only if there's more than one real use, but we don't bother.
1007 return NULL;
1008 }
1009 return new (phase->C, 3) LoadINode(andl->in(MemNode::Control),andl->in(MemNode::Memory),adr,((LoadLNode*)andl)->raw_adr_type());
1010 #endif
1011 }
1012
1013 return NULL; 988 return NULL;
1014 } 989 }
1015 990
1016 //============================================================================= 991 //=============================================================================
1017 //------------------------------Value------------------------------------------ 992 //------------------------------Value------------------------------------------

mercurial