< prev index next >
src/share/vm/opto/subnode.cpp
Print this page
*** 34,43 ****
--- 34,47 ----
#include "opto/mulnode.hpp"
#include "opto/opcodes.hpp"
#include "opto/phaseX.hpp"
#include "opto/subnode.hpp"
#include "runtime/sharedRuntime.hpp"
+ #if INCLUDE_ALL_GCS
+ #include "gc_implementation/shenandoah/c2/shenandoahBarrierSetC2.hpp"
+ #include "gc_implementation/shenandoah/c2/shenandoahSupport.hpp"
+ #endif
// Portions of code courtesy of Clifford Click
// Optimization - Graph Style
*** 847,858 ****
static inline Node* isa_java_mirror_load(PhaseGVN* phase, Node* n) {
// Return the klass node for
// LoadP(AddP(foo:Klass, #java_mirror))
// or NULL if not matching.
- if (n->Opcode() != Op_LoadP) return NULL;
const TypeInstPtr* tp = phase->type(n)->isa_instptr();
if (!tp || tp->klass() != phase->C->env()->Class_klass()) return NULL;
Node* adr = n->in(MemNode::Address);
intptr_t off = 0;
--- 851,868 ----
static inline Node* isa_java_mirror_load(PhaseGVN* phase, Node* n) {
// Return the klass node for
// LoadP(AddP(foo:Klass, #java_mirror))
// or NULL if not matching.
+ #if INCLUDE_ALL_GCS
+ if (UseShenandoahGC) {
+ n = ShenandoahBarrierSetC2::bsc2()->step_over_gc_barrier(n);
+ }
+ #endif
+
+ if (n->Opcode() != Op_LoadP) return NULL;
const TypeInstPtr* tp = phase->type(n)->isa_instptr();
if (!tp || tp->klass() != phase->C->env()->Class_klass()) return NULL;
Node* adr = n->in(MemNode::Address);
intptr_t off = 0;
*** 915,926 ****
Node* conk2 = isa_const_java_mirror(phase, in(2));
if (k1 && (k2 || conk2)) {
Node* lhs = k1;
Node* rhs = (k2 != NULL) ? k2 : conk2;
! this->set_req(1, lhs);
! this->set_req(2, rhs);
return this;
}
}
// Constant pointer on right?
--- 925,945 ----
Node* conk2 = isa_const_java_mirror(phase, in(2));
if (k1 && (k2 || conk2)) {
Node* lhs = k1;
Node* rhs = (k2 != NULL) ? k2 : conk2;
! #if INCLUDE_ALL_GCS
! PhaseIterGVN* igvn = phase->is_IterGVN();
! if (UseShenandoahGC && igvn != NULL) {
! set_req_X(1, lhs, igvn);
! set_req_X(2, rhs, igvn);
! } else
! #endif
! {
! set_req(1, lhs);
! set_req(2, rhs);
! }
return this;
}
}
// Constant pointer on right?
< prev index next >