Mercurial > hg > graal-compiler
comparison src/share/vm/opto/chaitin.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 042b5e9aeb76 78bbf4d43a14 |
children |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
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. |
759 // Check for vector live range (only if vector register is used). | 759 // Check for vector live range (only if vector register is used). |
760 // On SPARC vector uses RegD which could be misaligned so it is not | 760 // On SPARC vector uses RegD which could be misaligned so it is not |
761 // processes as vector in RA. | 761 // processes as vector in RA. |
762 if (RegMask::is_vector(ireg)) | 762 if (RegMask::is_vector(ireg)) |
763 lrg._is_vector = 1; | 763 lrg._is_vector = 1; |
764 assert(n_type->isa_vect() == NULL || lrg._is_vector || ireg == Op_RegD, | 764 assert(n_type->isa_vect() == NULL || lrg._is_vector || ireg == Op_RegD || ireg == Op_RegL, |
765 "vector must be in vector registers"); | 765 "vector must be in vector registers"); |
766 | 766 |
767 // Check for bound register masks | 767 // Check for bound register masks |
768 const RegMask &lrgmask = lrg.mask(); | 768 const RegMask &lrgmask = lrg.mask(); |
769 if (lrgmask.is_bound(ireg)) { | 769 if (lrgmask.is_bound(ireg)) { |
959 // Check for bound register masks | 959 // Check for bound register masks |
960 const RegMask &lrgmask = lrg.mask(); | 960 const RegMask &lrgmask = lrg.mask(); |
961 int kreg = n->in(k)->ideal_reg(); | 961 int kreg = n->in(k)->ideal_reg(); |
962 bool is_vect = RegMask::is_vector(kreg); | 962 bool is_vect = RegMask::is_vector(kreg); |
963 assert(n->in(k)->bottom_type()->isa_vect() == NULL || | 963 assert(n->in(k)->bottom_type()->isa_vect() == NULL || |
964 is_vect || kreg == Op_RegD, | 964 is_vect || kreg == Op_RegD || kreg == Op_RegL, |
965 "vector must be in vector registers"); | 965 "vector must be in vector registers"); |
966 if (lrgmask.is_bound(kreg)) | 966 if (lrgmask.is_bound(kreg)) |
967 lrg._is_bound = 1; | 967 lrg._is_bound = 1; |
968 | 968 |
969 // If this use of a double forces a mis-aligned double, | 969 // If this use of a double forces a mis-aligned double, |
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"); |