src/share/vm/opto/ifg.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/ifg.cpp Sat Jun 2 20:04:12 2012
--- new/src/share/vm/opto/ifg.cpp Sat Jun 2 20:04:12 2012
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 1998, 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.
*** 414,423 ****
--- 414,424 ----
uint cnt = 0;
while ((lidx = elements.next()) != 0) {
if( lrgs(lidx).mask().is_UP() &&
lrgs(lidx).mask_size() &&
!lrgs(lidx)._is_float &&
+ !lrgs(lidx)._is_vector &&
lrgs(lidx).mask().overlap(*Matcher::idealreg2regmask[Op_RegI]) )
cnt += lrgs(lidx).reg_pressure();
}
return cnt;
}
*** 428,448 ****
--- 429,449 ----
uint lidx;
uint cnt = 0;
while ((lidx = elements.next()) != 0) {
if( lrgs(lidx).mask().is_UP() &&
lrgs(lidx).mask_size() &&
! (lrgs(lidx)._is_float || lrgs(lidx)._is_vector))
cnt += lrgs(lidx).reg_pressure();
}
return cnt;
}
//------------------------------lower_pressure---------------------------------
// Adjust register pressure down by 1. Capture last hi-to-low transition,
static void lower_pressure( LRG *lrg, uint where, Block *b, uint *pressure, uint *hrp_index ) {
! if( lrg->mask().is_UP() && lrg->mask_size() ) {
! if( lrg->_is_float ) {
! if (lrg->mask().is_UP() && lrg->mask_size()) {
! if (lrg->_is_float || lrg->_is_vector) {
pressure[1] -= lrg->reg_pressure();
if( pressure[1] == (uint)FLOATPRESSURE ) {
hrp_index[1] = where;
#ifdef EXACT_PRESSURE
if( pressure[1] > b->_freg_pressure )
*** 520,531 ****
--- 521,532 ----
uint lidx;
while ((lidx = elements.next()) != 0) {
LRG &lrg = lrgs(lidx);
lrg._area += cost;
// Compute initial register pressure
! if( lrg.mask().is_UP() && lrg.mask_size() ) {
! if( lrg._is_float ) { // Count float pressure
! if (lrg.mask().is_UP() && lrg.mask_size()) {
! if (lrg._is_float || lrg._is_vector) { // Count float pressure
pressure[1] += lrg.reg_pressure();
#ifdef EXACT_PRESSURE
if( pressure[1] > b->_freg_pressure )
b->_freg_pressure = pressure[1];
#endif
*** 679,695 ****
--- 680,693 ----
// DEFs are not bound but the live range is, some uses must be bound.
// If we spill live range 'r', it can rematerialize at each use site
// according to its bindings.
const RegMask &rmask = lrgs(r).mask();
if( lrgs(r).is_bound() && !(n->rematerialize()) && rmask.is_NotEmpty() ) {
// Smear odd bits; leave only aligned pairs of bits.
RegMask r2mask = rmask;
r2mask.SmearToPairs();
// Check for common case
int r_size = lrgs(r).num_regs();
OptoReg::Name r_reg = (r_size == 1) ? rmask.find_first_elem() : OptoReg::Physical;
+ // Smear odd bits
IndexSetIterator elements(&liveout);
uint l;
while ((l = elements.next()) != 0) {
LRG &lrg = lrgs(l);
// If 'l' must spill already, do not further hack his bits.
*** 699,712 ****
--- 697,715 ----
RegMask old = lrg.mask();
uint old_size = lrg.mask_size();
// Remove the bits from LRG 'r' from LRG 'l' so 'l' no
// longer interferes with 'r'. If 'l' requires aligned
// adjacent pairs, subtract out bit pairs.
if( lrg.num_regs() == 2 && !lrg._fat_proj ) {
+ assert(!lrg._is_vector || !lrg._fat_proj, "sanity");
+ if (lrg.num_regs() > 1 && !lrg._fat_proj) {
+ RegMask r2mask = rmask;
+ // Leave only aligned set of bits.
+ r2mask.smear_to_sets(lrg.num_regs());
+ // It includes vector case.
lrg.SUBTRACT( r2mask );
lrg.compute_set_mask_size();
! } else if( r_size != 1 ) { // fat proj
lrg.SUBTRACT( rmask );
lrg.compute_set_mask_size();
} else { // Common case: size 1 bound removal
if( lrg.mask().Member(r_reg) ) {
lrg.Remove(r_reg);
*** 761,772 ****
--- 764,775 ----
// It is live now
if( liveout.insert( x ) ) {
// Newly live things assumed live from here to top of block
lrg._area += cost;
// Adjust register pressure
! if( lrg.mask().is_UP() && lrg.mask_size() ) {
! if( lrg._is_float ) {
! if (lrg.mask().is_UP() && lrg.mask_size()) {
! if (lrg._is_float || lrg._is_vector) {
pressure[1] += lrg.reg_pressure();
#ifdef EXACT_PRESSURE
if( pressure[1] > b->_freg_pressure )
b->_freg_pressure = pressure[1];
#endif
src/share/vm/opto/ifg.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File