1690 } else {
1691 // Cannot call transform on it just yet
1692 igvn->set_type_bottom(iff);
1693 }
1694 igvn->_worklist.push(iff);
1695
1696 // Now handle projections. Cloning not required.
1697 Node* new_if_f = (Node*)(new IfFalseNode( iff ));
1698 Node* new_if_t = (Node*)(new IfTrueNode ( iff ));
1699
1700 igvn->register_new_node_with_optimizer(new_if_f);
1701 igvn->register_new_node_with_optimizer(new_if_t);
1702 // Flip test, so flip trailing control
1703 igvn->replace_node(old_if_f, new_if_t);
1704 igvn->replace_node(old_if_t, new_if_f);
1705
1706 // Progress
1707 return iff;
1708 }
1709
1710 bool IfNode::is_g1_marking_if(PhaseTransform *phase) const {
1711 if (Opcode() != Op_If) {
1712 return false;
1713 }
1714
1715 Node* bol = in(1);
1716 assert(bol->is_Bool(), "");
1717 Node* cmpx = bol->in(1);
1718 if (bol->as_Bool()->_test._test == BoolTest::ne &&
1719 cmpx->is_Cmp() && cmpx->in(2) == phase->intcon(0) &&
1720 cmpx->in(1)->is_g1_marking_load()) {
1721 return true;
1722 }
1723 return false;
1724 }
1725
1726 #if INCLUDE_SHENANDOAHGC
1727 bool IfNode::is_shenandoah_marking_if(PhaseTransform *phase) const {
1728 if (!UseShenandoahGC) {
1729 return false;
1730 }
1731
1732 if (Opcode() != Op_If) {
1733 return false;
1734 }
1735
1736 Node* bol = in(1);
1737 assert(bol->is_Bool(), "");
1738 Node* cmpx = bol->in(1);
1739 if (bol->as_Bool()->_test._test == BoolTest::ne &&
1740 cmpx->is_Cmp() && cmpx->in(2) == phase->intcon(0) &&
1741 cmpx->in(1)->in(1)->is_shenandoah_state_load() &&
1742 cmpx->in(1)->in(2)->is_Con() &&
1743 cmpx->in(1)->in(2) == phase->intcon(ShenandoahHeap::MARKING)) {
1744 return true;
1745 }
|
1690 } else {
1691 // Cannot call transform on it just yet
1692 igvn->set_type_bottom(iff);
1693 }
1694 igvn->_worklist.push(iff);
1695
1696 // Now handle projections. Cloning not required.
1697 Node* new_if_f = (Node*)(new IfFalseNode( iff ));
1698 Node* new_if_t = (Node*)(new IfTrueNode ( iff ));
1699
1700 igvn->register_new_node_with_optimizer(new_if_f);
1701 igvn->register_new_node_with_optimizer(new_if_t);
1702 // Flip test, so flip trailing control
1703 igvn->replace_node(old_if_f, new_if_t);
1704 igvn->replace_node(old_if_t, new_if_f);
1705
1706 // Progress
1707 return iff;
1708 }
1709
1710 #if INCLUDE_SHENANDOAHGC
1711 bool IfNode::is_shenandoah_marking_if(PhaseTransform *phase) const {
1712 if (!UseShenandoahGC) {
1713 return false;
1714 }
1715
1716 if (Opcode() != Op_If) {
1717 return false;
1718 }
1719
1720 Node* bol = in(1);
1721 assert(bol->is_Bool(), "");
1722 Node* cmpx = bol->in(1);
1723 if (bol->as_Bool()->_test._test == BoolTest::ne &&
1724 cmpx->is_Cmp() && cmpx->in(2) == phase->intcon(0) &&
1725 cmpx->in(1)->in(1)->is_shenandoah_state_load() &&
1726 cmpx->in(1)->in(2)->is_Con() &&
1727 cmpx->in(1)->in(2) == phase->intcon(ShenandoahHeap::MARKING)) {
1728 return true;
1729 }
|