< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp

Print this page




1343       stack.push(lrb, 0);
1344       clones.push(lrb_clone);
1345 
1346       do {
1347         assert(stack.size() == clones.size(), "");
1348         Node* n = stack.node();
1349 #ifdef ASSERT
1350         if (n->is_Load()) {
1351           Node* mem = n->in(MemNode::Memory);
1352           for (DUIterator_Fast jmax, j = mem->fast_outs(jmax); j < jmax; j++) {
1353             Node* u = mem->fast_out(j);
1354             assert(!u->is_Store() || !u->is_LoadStore() || phase->get_ctrl(u) != ctrl, "anti dependent store?");
1355           }
1356         }
1357 #endif
1358         uint idx = stack.index();
1359         Node* n_clone = clones.at(clones.size()-1);
1360         if (idx < n->outcnt()) {
1361           Node* u = n->raw_out(idx);
1362           Node* c = phase->ctrl_or_self(u);
1363           if (phase->is_dominator(call, c) && phase->is_dominator(c, projs.fallthrough_proj)) {
1364             stack.set_index(idx+1);
1365             assert(!u->is_CFG(), "");
1366             stack.push(u, 0);
1367             Node* u_clone = u->clone();
1368             int nb = u_clone->replace_edge(n, n_clone);
1369             assert(nb > 0, "should have replaced some uses");
1370             phase->register_new_node(u_clone, projs->catchall_catchproj);
1371             clones.push(u_clone);
1372             phase->set_ctrl(u, projs->fallthrough_catchproj);
1373           } else {
1374             bool replaced = false;
1375             if (u->is_Phi()) {
1376               for (uint k = 1; k < u->req(); k++) {
1377                 if (u->in(k) == n) {
1378                   if (phase->is_dominator(projs->catchall_catchproj, u->in(0)->in(k))) {
1379                     phase->igvn().replace_input_of(u, k, n_clone);
1380                     replaced = true;
1381                   } else if (!phase->is_dominator(projs->fallthrough_catchproj, u->in(0)->in(k))) {
1382                     phase->igvn().replace_input_of(u, k, create_phis_on_call_return(ctrl, u->in(0)->in(k), n, n_clone, projs, phase));
1383                     replaced = true;




1343       stack.push(lrb, 0);
1344       clones.push(lrb_clone);
1345 
1346       do {
1347         assert(stack.size() == clones.size(), "");
1348         Node* n = stack.node();
1349 #ifdef ASSERT
1350         if (n->is_Load()) {
1351           Node* mem = n->in(MemNode::Memory);
1352           for (DUIterator_Fast jmax, j = mem->fast_outs(jmax); j < jmax; j++) {
1353             Node* u = mem->fast_out(j);
1354             assert(!u->is_Store() || !u->is_LoadStore() || phase->get_ctrl(u) != ctrl, "anti dependent store?");
1355           }
1356         }
1357 #endif
1358         uint idx = stack.index();
1359         Node* n_clone = clones.at(clones.size()-1);
1360         if (idx < n->outcnt()) {
1361           Node* u = n->raw_out(idx);
1362           Node* c = phase->ctrl_or_self(u);
1363           if (phase->is_dominator(call, c) && phase->is_dominator(c, projs->fallthrough_proj)) {
1364             stack.set_index(idx+1);
1365             assert(!u->is_CFG(), "");
1366             stack.push(u, 0);
1367             Node* u_clone = u->clone();
1368             int nb = u_clone->replace_edge(n, n_clone);
1369             assert(nb > 0, "should have replaced some uses");
1370             phase->register_new_node(u_clone, projs->catchall_catchproj);
1371             clones.push(u_clone);
1372             phase->set_ctrl(u, projs->fallthrough_catchproj);
1373           } else {
1374             bool replaced = false;
1375             if (u->is_Phi()) {
1376               for (uint k = 1; k < u->req(); k++) {
1377                 if (u->in(k) == n) {
1378                   if (phase->is_dominator(projs->catchall_catchproj, u->in(0)->in(k))) {
1379                     phase->igvn().replace_input_of(u, k, n_clone);
1380                     replaced = true;
1381                   } else if (!phase->is_dominator(projs->fallthrough_catchproj, u->in(0)->in(k))) {
1382                     phase->igvn().replace_input_of(u, k, create_phis_on_call_return(ctrl, u->in(0)->in(k), n, n_clone, projs, phase));
1383                     replaced = true;


< prev index next >