Mercurial > hg > graal-compiler
diff src/share/vm/opto/lcm.cpp @ 642:660978a2a31a
6791178: Specialize for zero as the compressed oop vm heap base
Summary: Use zero based compressed oops if java heap is below 32gb and unscaled compressed oops if java heap is below 4gb.
Reviewed-by: never, twisti, jcoomes, coleenp
author | kvn |
---|---|
date | Thu, 12 Mar 2009 10:37:46 -0700 |
parents | 3b5ac9e7e6ea |
children | bd441136a5ce |
line wrap: on
line diff
--- a/src/share/vm/opto/lcm.cpp Wed Mar 11 14:16:13 2009 -0700 +++ b/src/share/vm/opto/lcm.cpp Thu Mar 12 10:37:46 2009 -0700 @@ -158,7 +158,14 @@ continue; // Give up if offset is beyond page size // cannot reason about it; is probably not implicit null exception } else { - const TypePtr* tptr = base->bottom_type()->is_ptr(); + const TypePtr* tptr; + if (UseCompressedOops && Universe::narrow_oop_shift() == 0) { + // 32-bits narrow oop can be the base of address expressions + tptr = base->bottom_type()->make_ptr(); + } else { + // only regular oops are expected here + tptr = base->bottom_type()->is_ptr(); + } // Give up if offset is not a compile-time constant if( offset == Type::OffsetBot || tptr->_offset == Type::OffsetBot ) continue;