< prev index next >
src/share/vm/opto/library_call.cpp
Print this page
rev 10595 : [backport] clean up obsolete c2 code
- barriers are never added on constant oops
- write barriers are always expanded to IR
*** 2693,2714 ****
// Can base be NULL? Otherwise, always on-heap access.
bool can_access_non_heap = TypePtr::NULL_PTR->higher_equal(_gvn.type(heap_base_oop));
const TypePtr *adr_type = _gvn.type(adr)->isa_ptr();
- if (UseShenandoahGC && adr->is_AddP() &&
- adr->in(AddPNode::Base) == adr->in(AddPNode::Address)) {
- Node* base = ShenandoahBarrierNode::skip_through_barrier(adr->in(AddPNode::Base));
- const TypeInstPtr* base_t = _gvn.type(base)->isa_instptr();
- if (base_t != NULL &&
- base_t->const_oop() != NULL &&
- base_t->klass() == ciEnv::current()->Class_klass() &&
- adr_type->is_instptr()->offset() >= base_t->klass()->as_instance_klass()->size_helper() * wordSize) {
- adr_type = base_t->add_offset(adr_type->is_instptr()->offset());
- }
- }
-
// Try to categorize the address.
Compile::AliasType* alias_type = C->alias_type(adr_type);
assert(alias_type->index() != Compile::AliasIdxBot, "no bare pointers here");
if (alias_type->adr_type() == TypeInstPtr::KLASS ||
--- 2693,2702 ----
*** 7074,7084 ****
bool LibraryCallKit::inline_profileBoolean() {
Node* counts = argument(1);
const TypeAryPtr* ary = NULL;
ciArray* aobj = NULL;
- assert(!(ShenandoahBarrierNode::skip_through_barrier(counts)->is_Con() && !counts->is_Con()), "barrier prevents optimization");
if (counts->is_Con()
&& (ary = counts->bottom_type()->isa_aryptr()) != NULL
&& (aobj = ary->const_oop()->as_array()) != NULL
&& (aobj->length() == 2)) {
// Profile is int[2] where [0] and [1] correspond to false and true value occurrences respectively.
--- 7062,7071 ----
< prev index next >