Mercurial > hg > graal-compiler
comparison src/share/vm/opto/loopnode.cpp @ 10405:f2110083203d
8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
author | sla |
---|---|
date | Mon, 10 Jun 2013 11:30:51 +0200 |
parents | 30f42e691e70 |
children | 3213ba4d3dff |
comparison
equal
deleted
inserted
replaced
10404:d0add7016434 | 10405:f2110083203d |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
438 | 438 |
439 // ================================================= | 439 // ================================================= |
440 // ---- SUCCESS! Found A Trip-Counted Loop! ----- | 440 // ---- SUCCESS! Found A Trip-Counted Loop! ----- |
441 // | 441 // |
442 assert(x->Opcode() == Op_Loop, "regular loops only"); | 442 assert(x->Opcode() == Op_Loop, "regular loops only"); |
443 C->print_method("Before CountedLoop", 3); | 443 C->print_method(PHASE_BEFORE_CLOOPS, 3); |
444 | 444 |
445 Node *hook = new (C) Node(6); | 445 Node *hook = new (C) Node(6); |
446 | 446 |
447 if (LoopLimitCheck) { | 447 if (LoopLimitCheck) { |
448 | 448 |
789 tty->print("Counted "); | 789 tty->print("Counted "); |
790 loop->dump_head(); | 790 loop->dump_head(); |
791 } | 791 } |
792 #endif | 792 #endif |
793 | 793 |
794 C->print_method("After CountedLoop", 3); | 794 C->print_method(PHASE_AFTER_CLOOPS, 3); |
795 | 795 |
796 return true; | 796 return true; |
797 } | 797 } |
798 | 798 |
799 //----------------------exact_limit------------------------------------------- | 799 //----------------------exact_limit------------------------------------------- |
2162 _ltree_root->set_nest( 0 ); | 2162 _ltree_root->set_nest( 0 ); |
2163 | 2163 |
2164 // Split shared headers and insert loop landing pads. | 2164 // Split shared headers and insert loop landing pads. |
2165 // Do not bother doing this on the Root loop of course. | 2165 // Do not bother doing this on the Root loop of course. |
2166 if( !_verify_me && !_verify_only && _ltree_root->_child ) { | 2166 if( !_verify_me && !_verify_only && _ltree_root->_child ) { |
2167 C->print_method("Before beautify loops", 3); | 2167 C->print_method(PHASE_BEFORE_BEAUTIFY_LOOPS, 3); |
2168 if( _ltree_root->_child->beautify_loops( this ) ) { | 2168 if( _ltree_root->_child->beautify_loops( this ) ) { |
2169 // Re-build loop tree! | 2169 // Re-build loop tree! |
2170 _ltree_root->_child = NULL; | 2170 _ltree_root->_child = NULL; |
2171 _nodes.clear(); | 2171 _nodes.clear(); |
2172 reallocate_preorders(); | 2172 reallocate_preorders(); |
2176 return; | 2176 return; |
2177 } | 2177 } |
2178 // Reset loop nesting depth | 2178 // Reset loop nesting depth |
2179 _ltree_root->set_nest( 0 ); | 2179 _ltree_root->set_nest( 0 ); |
2180 | 2180 |
2181 C->print_method("After beautify loops", 3); | 2181 C->print_method(PHASE_AFTER_BEAUTIFY_LOOPS, 3); |
2182 } | 2182 } |
2183 } | 2183 } |
2184 | 2184 |
2185 // Build Dominators for elision of NULL checks & loop finding. | 2185 // Build Dominators for elision of NULL checks & loop finding. |
2186 // Since nodes do not have a slot for immediate dominator, make | 2186 // Since nodes do not have a slot for immediate dominator, make |