1947 default:
1948 #ifndef PRODUCT
1949 if( PrintOpto )
1950 tty->print_cr("missed RCE opportunity");
1951 #endif
1952 continue; // Unhandled case
1953 }
1954 }
1955
1956 // Kill the eliminated test
1957 C->set_major_progress();
1958 Node *kill_con = _igvn.intcon( 1-flip );
1959 set_ctrl(kill_con, C->root());
1960 _igvn.replace_input_of(iff, 1, kill_con);
1961 // Find surviving projection
1962 assert(iff->is_If(), "");
1963 ProjNode* dp = ((IfNode*)iff)->proj_out(1-flip);
1964 // Find loads off the surviving projection; remove their control edge
1965 for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
1966 Node* cd = dp->fast_out(i); // Control-dependent node
1967 if( cd->is_Load() ) { // Loads can now float around in the loop
1968 // Allow the load to float around in the loop, or before it
1969 // but NOT before the pre-loop.
1970 _igvn.replace_input_of(cd, 0, ctrl); // ctrl, not NULL
1971 --i;
1972 --imax;
1973 }
1974 }
1975
1976 } // End of is IF
1977
1978 }
1979
1980 // Update loop limits
1981 if (conditional_rc) {
1982 pre_limit = (stride_con > 0) ? (Node*)new (C) MinINode(pre_limit, orig_limit)
1983 : (Node*)new (C) MaxINode(pre_limit, orig_limit);
1984 register_new_node(pre_limit, pre_ctrl);
1985 }
1986 _igvn.hash_delete(pre_opaq);
1987 pre_opaq->set_req(1, pre_limit);
|
1947 default:
1948 #ifndef PRODUCT
1949 if( PrintOpto )
1950 tty->print_cr("missed RCE opportunity");
1951 #endif
1952 continue; // Unhandled case
1953 }
1954 }
1955
1956 // Kill the eliminated test
1957 C->set_major_progress();
1958 Node *kill_con = _igvn.intcon( 1-flip );
1959 set_ctrl(kill_con, C->root());
1960 _igvn.replace_input_of(iff, 1, kill_con);
1961 // Find surviving projection
1962 assert(iff->is_If(), "");
1963 ProjNode* dp = ((IfNode*)iff)->proj_out(1-flip);
1964 // Find loads off the surviving projection; remove their control edge
1965 for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
1966 Node* cd = dp->fast_out(i); // Control-dependent node
1967 if (cd->is_Load() && cd->depends_only_on_test()) { // Loads can now float around in the loop
1968 // Allow the load to float around in the loop, or before it
1969 // but NOT before the pre-loop.
1970 _igvn.replace_input_of(cd, 0, ctrl); // ctrl, not NULL
1971 --i;
1972 --imax;
1973 }
1974 }
1975
1976 } // End of is IF
1977
1978 }
1979
1980 // Update loop limits
1981 if (conditional_rc) {
1982 pre_limit = (stride_con > 0) ? (Node*)new (C) MinINode(pre_limit, orig_limit)
1983 : (Node*)new (C) MaxINode(pre_limit, orig_limit);
1984 register_new_node(pre_limit, pre_ctrl);
1985 }
1986 _igvn.hash_delete(pre_opaq);
1987 pre_opaq->set_req(1, pre_limit);
|