< prev index next >

src/hotspot/share/opto/loopUnswitch.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 77,87 **** if (phase->find_unswitching_candidate(this) == NULL) { return false; } // Too speculative if running low on nodes. ! return phase->may_require_nodes(est_loop_clone_sz(2)); } //------------------------------find_unswitching_candidate----------------------------- // Find candidate "if" for unswitching IfNode* PhaseIdealLoop::find_unswitching_candidate(const IdealLoopTree *loop) const { --- 77,87 ---- if (phase->find_unswitching_candidate(this) == NULL) { return false; } // Too speculative if running low on nodes. ! return phase->may_require_nodes(est_loop_clone_sz(3, _body.size())); } //------------------------------find_unswitching_candidate----------------------------- // Find candidate "if" for unswitching IfNode* PhaseIdealLoop::find_unswitching_candidate(const IdealLoopTree *loop) const {
*** 114,124 **** //------------------------------do_unswitching----------------------------- // Clone loop with an invariant test (that does not exit) and // insert a clone of the test that selects which version to // execute. ! void PhaseIdealLoop::do_unswitching(IdealLoopTree *loop, Node_List &old_new) { // Find first invariant test that doesn't exit the loop LoopNode *head = loop->_head->as_Loop(); IfNode* unswitch_iff = find_unswitching_candidate((const IdealLoopTree *)loop); --- 114,124 ---- //------------------------------do_unswitching----------------------------- // Clone loop with an invariant test (that does not exit) and // insert a clone of the test that selects which version to // execute. ! void PhaseIdealLoop::do_unswitching (IdealLoopTree *loop, Node_List &old_new) { // Find first invariant test that doesn't exit the loop LoopNode *head = loop->_head->as_Loop(); IfNode* unswitch_iff = find_unswitching_candidate((const IdealLoopTree *)loop);
< prev index next >