Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
641:6af0a709d52b | 642:660978a2a31a |
---|---|
156 if( val->bottom_type()->isa_narrowoop() && | 156 if( val->bottom_type()->isa_narrowoop() && |
157 MacroAssembler::needs_explicit_null_check(offset) ) | 157 MacroAssembler::needs_explicit_null_check(offset) ) |
158 continue; // Give up if offset is beyond page size | 158 continue; // Give up if offset is beyond page size |
159 // cannot reason about it; is probably not implicit null exception | 159 // cannot reason about it; is probably not implicit null exception |
160 } else { | 160 } else { |
161 const TypePtr* tptr = base->bottom_type()->is_ptr(); | 161 const TypePtr* tptr; |
162 if (UseCompressedOops && Universe::narrow_oop_shift() == 0) { | |
163 // 32-bits narrow oop can be the base of address expressions | |
164 tptr = base->bottom_type()->make_ptr(); | |
165 } else { | |
166 // only regular oops are expected here | |
167 tptr = base->bottom_type()->is_ptr(); | |
168 } | |
162 // Give up if offset is not a compile-time constant | 169 // Give up if offset is not a compile-time constant |
163 if( offset == Type::OffsetBot || tptr->_offset == Type::OffsetBot ) | 170 if( offset == Type::OffsetBot || tptr->_offset == Type::OffsetBot ) |
164 continue; | 171 continue; |
165 offset += tptr->_offset; // correct if base is offseted | 172 offset += tptr->_offset; // correct if base is offseted |
166 if( MacroAssembler::needs_explicit_null_check(offset) ) | 173 if( MacroAssembler::needs_explicit_null_check(offset) ) |