1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/vm/opto/phasetype.hpp Wed Apr 27 01:25:04 2016 +0800 1.3 @@ -0,0 +1,98 @@ 1.4 +/* 1.5 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. 1.11 + * 1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.15 + * version 2 for more details (a copy is included in the LICENSE file that 1.16 + * accompanied this code). 1.17 + * 1.18 + * You should have received a copy of the GNU General Public License version 1.19 + * 2 along with this work; if not, write to the Free Software Foundation, 1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.21 + * 1.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.23 + * or visit www.oracle.com if you need additional information or have any 1.24 + * questions. 1.25 + * 1.26 + */ 1.27 + 1.28 +#ifndef SHARE_VM_OPTO_PHASETYPE_HPP 1.29 +#define SHARE_VM_OPTO_PHASETYPE_HPP 1.30 + 1.31 +enum CompilerPhaseType { 1.32 + PHASE_BEFORE_STRINGOPTS, 1.33 + PHASE_AFTER_STRINGOPTS, 1.34 + PHASE_BEFORE_REMOVEUSELESS, 1.35 + PHASE_AFTER_PARSING, 1.36 + PHASE_ITER_GVN1, 1.37 + PHASE_PHASEIDEAL_BEFORE_EA, 1.38 + PHASE_ITER_GVN_AFTER_EA, 1.39 + PHASE_ITER_GVN_AFTER_ELIMINATION, 1.40 + PHASE_PHASEIDEALLOOP1, 1.41 + PHASE_PHASEIDEALLOOP2, 1.42 + PHASE_PHASEIDEALLOOP3, 1.43 + PHASE_CPP1, 1.44 + PHASE_ITER_GVN2, 1.45 + PHASE_PHASEIDEALLOOP_ITERATIONS, 1.46 + PHASE_OPTIMIZE_FINISHED, 1.47 + PHASE_GLOBAL_CODE_MOTION, 1.48 + PHASE_FINAL_CODE, 1.49 + PHASE_AFTER_EA, 1.50 + PHASE_BEFORE_CLOOPS, 1.51 + PHASE_AFTER_CLOOPS, 1.52 + PHASE_BEFORE_BEAUTIFY_LOOPS, 1.53 + PHASE_AFTER_BEAUTIFY_LOOPS, 1.54 + PHASE_BEFORE_MATCHING, 1.55 + PHASE_INCREMENTAL_INLINE, 1.56 + PHASE_INCREMENTAL_BOXING_INLINE, 1.57 + PHASE_END, 1.58 + PHASE_FAILURE, 1.59 + 1.60 + PHASE_NUM_TYPES 1.61 +}; 1.62 + 1.63 +class CompilerPhaseTypeHelper { 1.64 + public: 1.65 + static const char* to_string(CompilerPhaseType cpt) { 1.66 + switch (cpt) { 1.67 + case PHASE_BEFORE_STRINGOPTS: return "Before StringOpts"; 1.68 + case PHASE_AFTER_STRINGOPTS: return "After StringOpts"; 1.69 + case PHASE_BEFORE_REMOVEUSELESS: return "Before RemoveUseless"; 1.70 + case PHASE_AFTER_PARSING: return "After Parsing"; 1.71 + case PHASE_ITER_GVN1: return "Iter GVN 1"; 1.72 + case PHASE_PHASEIDEAL_BEFORE_EA: return "PhaseIdealLoop before EA"; 1.73 + case PHASE_ITER_GVN_AFTER_EA: return "Iter GVN after EA"; 1.74 + case PHASE_ITER_GVN_AFTER_ELIMINATION: return "Iter GVN after eliminating allocations and locks"; 1.75 + case PHASE_PHASEIDEALLOOP1: return "PhaseIdealLoop 1"; 1.76 + case PHASE_PHASEIDEALLOOP2: return "PhaseIdealLoop 2"; 1.77 + case PHASE_PHASEIDEALLOOP3: return "PhaseIdealLoop 3"; 1.78 + case PHASE_CPP1: return "PhaseCPP 1"; 1.79 + case PHASE_ITER_GVN2: return "Iter GVN 2"; 1.80 + case PHASE_PHASEIDEALLOOP_ITERATIONS: return "PhaseIdealLoop iterations"; 1.81 + case PHASE_OPTIMIZE_FINISHED: return "Optimize finished"; 1.82 + case PHASE_GLOBAL_CODE_MOTION: return "Global code motion"; 1.83 + case PHASE_FINAL_CODE: return "Final Code"; 1.84 + case PHASE_AFTER_EA: return "After Escape Analysis"; 1.85 + case PHASE_BEFORE_CLOOPS: return "Before CountedLoop"; 1.86 + case PHASE_AFTER_CLOOPS: return "After CountedLoop"; 1.87 + case PHASE_BEFORE_BEAUTIFY_LOOPS: return "Before beautify loops"; 1.88 + case PHASE_AFTER_BEAUTIFY_LOOPS: return "After beautify loops"; 1.89 + case PHASE_BEFORE_MATCHING: return "Before Matching"; 1.90 + case PHASE_INCREMENTAL_INLINE: return "Incremental Inline"; 1.91 + case PHASE_INCREMENTAL_BOXING_INLINE: return "Incremental Boxing Inline"; 1.92 + case PHASE_END: return "End"; 1.93 + case PHASE_FAILURE: return "Failure"; 1.94 + default: 1.95 + ShouldNotReachHere(); 1.96 + return NULL; 1.97 + } 1.98 + } 1.99 +}; 1.100 + 1.101 +#endif //SHARE_VM_OPTO_PHASETYPE_HPP