401 for (uint j = 0; j < n->req(); j++) {
402 Node* in = n->in(j);
403 if (in != nullptr) {
404 wq.push(in);
405 }
406 }
407 }
408 }
409
410 // Support for macro expanded GC barriers
411 void ShenandoahBarrierSetC2::eliminate_gc_barrier_data(Node* node) const {
412 if (node->is_LoadStore()) {
413 LoadStoreNode* loadstore = node->as_LoadStore();
414 loadstore->set_barrier_data(0);
415 } else if (node->is_Mem()) {
416 MemNode* mem = node->as_Mem();
417 mem->set_barrier_data(0);
418 }
419 }
420
421 void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const {
422 eliminate_gc_barrier_data(node);
423 }
424
425 void ShenandoahBarrierSetC2::elide_dominated_barrier(MachNode* node, MachNode* dominator) const {
426 uint8_t orig_bd = node->barrier_data();
427 if (orig_bd == 0) {
428 // Nothing to do.
429 return;
430 }
431
432 uint8_t bd = orig_bd;
433 int node_opcode = node->ideal_Opcode();
434
435 if (dominator == nullptr) {
436 // Must be allocation node.
437 if (is_Load(node_opcode) || is_LoadStore(node_opcode)) {
438 // Loads from recent allocations do not need LRBs.
439 bd &= ~ShenandoahBitStrong;
440 }
441 if (is_Store(node_opcode) || is_LoadStore(node_opcode)) {
|
401 for (uint j = 0; j < n->req(); j++) {
402 Node* in = n->in(j);
403 if (in != nullptr) {
404 wq.push(in);
405 }
406 }
407 }
408 }
409
410 // Support for macro expanded GC barriers
411 void ShenandoahBarrierSetC2::eliminate_gc_barrier_data(Node* node) const {
412 if (node->is_LoadStore()) {
413 LoadStoreNode* loadstore = node->as_LoadStore();
414 loadstore->set_barrier_data(0);
415 } else if (node->is_Mem()) {
416 MemNode* mem = node->as_Mem();
417 mem->set_barrier_data(0);
418 }
419 }
420
421 void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseIterGVN* macro, Node* node) const {
422 eliminate_gc_barrier_data(node);
423 }
424
425 void ShenandoahBarrierSetC2::elide_dominated_barrier(MachNode* node, MachNode* dominator) const {
426 uint8_t orig_bd = node->barrier_data();
427 if (orig_bd == 0) {
428 // Nothing to do.
429 return;
430 }
431
432 uint8_t bd = orig_bd;
433 int node_opcode = node->ideal_Opcode();
434
435 if (dominator == nullptr) {
436 // Must be allocation node.
437 if (is_Load(node_opcode) || is_LoadStore(node_opcode)) {
438 // Loads from recent allocations do not need LRBs.
439 bd &= ~ShenandoahBitStrong;
440 }
441 if (is_Store(node_opcode) || is_LoadStore(node_opcode)) {
|