Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/chaitin.cpp @ 17937:78bbf4d43a14
8037816: Fix for 8036122 breaks build with Xcode5/clang
8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
8043164: Format warning in traceStream.hpp
Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings
Reviewed-by: kvn, coleenp, iveresov, twisti
author | drchase |
---|---|
date | Thu, 22 May 2014 15:52:41 -0400 |
parents | a9becfeecd1b |
children | 52b4284cb496 9df0d8f65fea |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2014, 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. |
2017 } | 2017 } |
2018 else { | 2018 else { |
2019 tty->print_cr("new LRG"); | 2019 tty->print_cr("new LRG"); |
2020 } | 2020 } |
2021 } | 2021 } |
2022 tty->print_cr(""); | 2022 tty->cr(); |
2023 | 2023 |
2024 // Dump lo-degree list | 2024 // Dump lo-degree list |
2025 tty->print("Lo degree: "); | 2025 tty->print("Lo degree: "); |
2026 for(uint i3 = _lo_degree; i3; i3 = lrgs(i3)._next ) | 2026 for(uint i3 = _lo_degree; i3; i3 = lrgs(i3)._next ) |
2027 tty->print("L%d ",i3); | 2027 tty->print("L%d ",i3); |
2028 tty->print_cr(""); | 2028 tty->cr(); |
2029 | 2029 |
2030 // Dump lo-stk-degree list | 2030 // Dump lo-stk-degree list |
2031 tty->print("Lo stk degree: "); | 2031 tty->print("Lo stk degree: "); |
2032 for(uint i4 = _lo_stk_degree; i4; i4 = lrgs(i4)._next ) | 2032 for(uint i4 = _lo_stk_degree; i4; i4 = lrgs(i4)._next ) |
2033 tty->print("L%d ",i4); | 2033 tty->print("L%d ",i4); |
2034 tty->print_cr(""); | 2034 tty->cr(); |
2035 | 2035 |
2036 // Dump lo-degree list | 2036 // Dump lo-degree list |
2037 tty->print("Hi degree: "); | 2037 tty->print("Hi degree: "); |
2038 for(uint i5 = _hi_degree; i5; i5 = lrgs(i5)._next ) | 2038 for(uint i5 = _hi_degree; i5; i5 = lrgs(i5)._next ) |
2039 tty->print("L%d ",i5); | 2039 tty->print("L%d ",i5); |
2040 tty->print_cr(""); | 2040 tty->cr(); |
2041 } | 2041 } |
2042 | 2042 |
2043 void PhaseChaitin::dump_degree_lists() const { | 2043 void PhaseChaitin::dump_degree_lists() const { |
2044 // Dump lo-degree list | 2044 // Dump lo-degree list |
2045 tty->print("Lo degree: "); | 2045 tty->print("Lo degree: "); |
2046 for( uint i = _lo_degree; i; i = lrgs(i)._next ) | 2046 for( uint i = _lo_degree; i; i = lrgs(i)._next ) |
2047 tty->print("L%d ",i); | 2047 tty->print("L%d ",i); |
2048 tty->print_cr(""); | 2048 tty->cr(); |
2049 | 2049 |
2050 // Dump lo-stk-degree list | 2050 // Dump lo-stk-degree list |
2051 tty->print("Lo stk degree: "); | 2051 tty->print("Lo stk degree: "); |
2052 for(uint i2 = _lo_stk_degree; i2; i2 = lrgs(i2)._next ) | 2052 for(uint i2 = _lo_stk_degree; i2; i2 = lrgs(i2)._next ) |
2053 tty->print("L%d ",i2); | 2053 tty->print("L%d ",i2); |
2054 tty->print_cr(""); | 2054 tty->cr(); |
2055 | 2055 |
2056 // Dump lo-degree list | 2056 // Dump lo-degree list |
2057 tty->print("Hi degree: "); | 2057 tty->print("Hi degree: "); |
2058 for(uint i3 = _hi_degree; i3; i3 = lrgs(i3)._next ) | 2058 for(uint i3 = _hi_degree; i3; i3 = lrgs(i3)._next ) |
2059 tty->print("L%d ",i3); | 2059 tty->print("L%d ",i3); |
2060 tty->print_cr(""); | 2060 tty->cr(); |
2061 } | 2061 } |
2062 | 2062 |
2063 void PhaseChaitin::dump_simplified() const { | 2063 void PhaseChaitin::dump_simplified() const { |
2064 tty->print("Simplified: "); | 2064 tty->print("Simplified: "); |
2065 for( uint i = _simplified; i; i = lrgs(i)._next ) | 2065 for( uint i = _simplified; i; i = lrgs(i)._next ) |
2066 tty->print("L%d ",i); | 2066 tty->print("L%d ",i); |
2067 tty->print_cr(""); | 2067 tty->cr(); |
2068 } | 2068 } |
2069 | 2069 |
2070 static char *print_reg( OptoReg::Name reg, const PhaseChaitin *pc, char *buf ) { | 2070 static char *print_reg( OptoReg::Name reg, const PhaseChaitin *pc, char *buf ) { |
2071 if ((int)reg < 0) | 2071 if ((int)reg < 0) |
2072 sprintf(buf, "<OptoReg::%d>", (int)reg); | 2072 sprintf(buf, "<OptoReg::%d>", (int)reg); |
2141 if( OptoReg::is_reg(parmreg)) { | 2141 if( OptoReg::is_reg(parmreg)) { |
2142 tty->print(":%s", OptoReg::regname(parmreg)); | 2142 tty->print(":%s", OptoReg::regname(parmreg)); |
2143 } | 2143 } |
2144 tty->print(" : parm %d: ", k); | 2144 tty->print(" : parm %d: ", k); |
2145 domain->field_at(k + TypeFunc::Parms)->dump(); | 2145 domain->field_at(k + TypeFunc::Parms)->dump(); |
2146 tty->print_cr(""); | 2146 tty->cr(); |
2147 } | 2147 } |
2148 } | 2148 } |
2149 | 2149 |
2150 // Check for un-owned padding above incoming args | 2150 // Check for un-owned padding above incoming args |
2151 OptoReg::Name reg = _matcher._new_SP; | 2151 OptoReg::Name reg = _matcher._new_SP; |
2163 for( j = 0; j < argcnt; j++) { | 2163 for( j = 0; j < argcnt; j++) { |
2164 if( _matcher._parm_regs[j].first() == reg || | 2164 if( _matcher._parm_regs[j].first() == reg || |
2165 _matcher._parm_regs[j].second() == reg ) { | 2165 _matcher._parm_regs[j].second() == reg ) { |
2166 tty->print("parm %d: ",j); | 2166 tty->print("parm %d: ",j); |
2167 domain->field_at(j + TypeFunc::Parms)->dump(); | 2167 domain->field_at(j + TypeFunc::Parms)->dump(); |
2168 tty->print_cr(""); | 2168 tty->cr(); |
2169 break; | 2169 break; |
2170 } | 2170 } |
2171 } | 2171 } |
2172 if( j >= argcnt ) | 2172 if( j >= argcnt ) |
2173 tty->print_cr("HOLE, owned by SELF"); | 2173 tty->print_cr("HOLE, owned by SELF"); |