523 // In(1) will be rematerialized, too.
524 // Stretching lots of inputs - don't do it.
525 if (in(1)->req() > (in(1)->is_MachConstant() ? 3U : 2U)) {
526 return false;
527 }
528 }
529
530 // Don't remateralize somebody with bound inputs - it stretches a
531 // fixed register lifetime.
532 uint idx = oper_input_base();
533 if (req() > idx) {
534 const RegMask &rm = in_RegMask(idx);
535 if (!rm.is_empty() && rm.is_bound(ideal_reg())) {
536 return false;
537 }
538 }
539
540 return true;
541 }
542
543 #ifndef PRODUCT
544 //------------------------------dump_spec--------------------------------------
545 // Print any per-operand special info
546 void MachNode::dump_spec(outputStream *st) const {
547 uint cnt = num_opnds();
548 for( uint i=0; i<cnt; i++ ) {
549 if (_opnds[i] != nullptr) {
550 _opnds[i]->dump_spec(st);
551 } else {
552 st->print(" _");
553 }
554 }
555 const TypePtr *t = adr_type();
556 if( t ) {
557 Compile* C = Compile::current();
558 if( C->alias_type(t)->is_volatile() )
559 st->print(" Volatile!");
560 }
561 if (barrier_data() != 0) {
562 st->print(" barrier(");
|
523 // In(1) will be rematerialized, too.
524 // Stretching lots of inputs - don't do it.
525 if (in(1)->req() > (in(1)->is_MachConstant() ? 3U : 2U)) {
526 return false;
527 }
528 }
529
530 // Don't remateralize somebody with bound inputs - it stretches a
531 // fixed register lifetime.
532 uint idx = oper_input_base();
533 if (req() > idx) {
534 const RegMask &rm = in_RegMask(idx);
535 if (!rm.is_empty() && rm.is_bound(ideal_reg())) {
536 return false;
537 }
538 }
539
540 return true;
541 }
542
543 //------------------------------is_CAS---------------------------------------
544 // return true if opcode is one of the possible CompareAndSwapX
545 // values otherwise false.
546 bool MachNode::is_CAS(bool maybe_volatile) const {
547 switch(this->ideal_Opcode()) {
548 // We handle these
549 case Op_CompareAndSwapI:
550 case Op_CompareAndSwapL:
551 case Op_CompareAndSwapP:
552 case Op_CompareAndSwapN:
553 case Op_CompareAndSwapB:
554 case Op_CompareAndSwapS:
555 case Op_GetAndSetI:
556 case Op_GetAndSetL:
557 case Op_GetAndSetP:
558 case Op_GetAndSetN:
559 case Op_GetAndAddI:
560 case Op_GetAndAddL:
561 return true;
562 case Op_CompareAndExchangeI:
563 case Op_CompareAndExchangeN:
564 case Op_CompareAndExchangeB:
565 case Op_CompareAndExchangeS:
566 case Op_CompareAndExchangeL:
567 case Op_CompareAndExchangeP:
568 case Op_WeakCompareAndSwapB:
569 case Op_WeakCompareAndSwapS:
570 case Op_WeakCompareAndSwapI:
571 case Op_WeakCompareAndSwapL:
572 case Op_WeakCompareAndSwapP:
573 case Op_WeakCompareAndSwapN:
574 return maybe_volatile;
575 default:
576 return false;
577 }
578 }
579
580 #ifndef PRODUCT
581 //------------------------------dump_spec--------------------------------------
582 // Print any per-operand special info
583 void MachNode::dump_spec(outputStream *st) const {
584 uint cnt = num_opnds();
585 for( uint i=0; i<cnt; i++ ) {
586 if (_opnds[i] != nullptr) {
587 _opnds[i]->dump_spec(st);
588 } else {
589 st->print(" _");
590 }
591 }
592 const TypePtr *t = adr_type();
593 if( t ) {
594 Compile* C = Compile::current();
595 if( C->alias_type(t)->is_volatile() )
596 st->print(" Volatile!");
597 }
598 if (barrier_data() != 0) {
599 st->print(" barrier(");
|