src/share/vm/opto/divnode.cpp

changeset 4115
e626685e9f6c
parent 3845
121e5708ae96
child 4153
b9a9ed0f8eeb
     1.1 --- a/src/share/vm/opto/divnode.cpp	Tue Sep 25 15:48:17 2012 -0700
     1.2 +++ b/src/share/vm/opto/divnode.cpp	Thu Sep 27 09:38:42 2012 -0700
     1.3 @@ -104,7 +104,7 @@
     1.4      // division by +/- 1
     1.5      if (!d_pos) {
     1.6        // Just negate the value
     1.7 -      q = new (phase->C, 3) SubINode(phase->intcon(0), dividend);
     1.8 +      q = new (phase->C) SubINode(phase->intcon(0), dividend);
     1.9      }
    1.10    } else if ( is_power_of_2(d) ) {
    1.11      // division by +/- a power of 2
    1.12 @@ -141,18 +141,18 @@
    1.13        // (-2+3)>>2 becomes 0, etc.
    1.14  
    1.15        // Compute 0 or -1, based on sign bit
    1.16 -      Node *sign = phase->transform(new (phase->C, 3) RShiftINode(dividend, phase->intcon(N - 1)));
    1.17 +      Node *sign = phase->transform(new (phase->C) RShiftINode(dividend, phase->intcon(N - 1)));
    1.18        // Mask sign bit to the low sign bits
    1.19 -      Node *round = phase->transform(new (phase->C, 3) URShiftINode(sign, phase->intcon(N - l)));
    1.20 +      Node *round = phase->transform(new (phase->C) URShiftINode(sign, phase->intcon(N - l)));
    1.21        // Round up before shifting
    1.22 -      dividend = phase->transform(new (phase->C, 3) AddINode(dividend, round));
    1.23 +      dividend = phase->transform(new (phase->C) AddINode(dividend, round));
    1.24      }
    1.25  
    1.26      // Shift for division
    1.27 -    q = new (phase->C, 3) RShiftINode(dividend, phase->intcon(l));
    1.28 +    q = new (phase->C) RShiftINode(dividend, phase->intcon(l));
    1.29  
    1.30      if (!d_pos) {
    1.31 -      q = new (phase->C, 3) SubINode(phase->intcon(0), phase->transform(q));
    1.32 +      q = new (phase->C) SubINode(phase->intcon(0), phase->transform(q));
    1.33      }
    1.34    } else {
    1.35      // Attempt the jint constant divide -> multiply transform found in
    1.36 @@ -164,33 +164,33 @@
    1.37      jint shift_const;
    1.38      if (magic_int_divide_constants(d, magic_const, shift_const)) {
    1.39        Node *magic = phase->longcon(magic_const);
    1.40 -      Node *dividend_long = phase->transform(new (phase->C, 2) ConvI2LNode(dividend));
    1.41 +      Node *dividend_long = phase->transform(new (phase->C) ConvI2LNode(dividend));
    1.42  
    1.43        // Compute the high half of the dividend x magic multiplication
    1.44 -      Node *mul_hi = phase->transform(new (phase->C, 3) MulLNode(dividend_long, magic));
    1.45 +      Node *mul_hi = phase->transform(new (phase->C) MulLNode(dividend_long, magic));
    1.46  
    1.47        if (magic_const < 0) {
    1.48 -        mul_hi = phase->transform(new (phase->C, 3) RShiftLNode(mul_hi, phase->intcon(N)));
    1.49 -        mul_hi = phase->transform(new (phase->C, 2) ConvL2INode(mul_hi));
    1.50 +        mul_hi = phase->transform(new (phase->C) RShiftLNode(mul_hi, phase->intcon(N)));
    1.51 +        mul_hi = phase->transform(new (phase->C) ConvL2INode(mul_hi));
    1.52  
    1.53          // The magic multiplier is too large for a 32 bit constant. We've adjusted
    1.54          // it down by 2^32, but have to add 1 dividend back in after the multiplication.
    1.55          // This handles the "overflow" case described by Granlund and Montgomery.
    1.56 -        mul_hi = phase->transform(new (phase->C, 3) AddINode(dividend, mul_hi));
    1.57 +        mul_hi = phase->transform(new (phase->C) AddINode(dividend, mul_hi));
    1.58  
    1.59          // Shift over the (adjusted) mulhi
    1.60          if (shift_const != 0) {
    1.61 -          mul_hi = phase->transform(new (phase->C, 3) RShiftINode(mul_hi, phase->intcon(shift_const)));
    1.62 +          mul_hi = phase->transform(new (phase->C) RShiftINode(mul_hi, phase->intcon(shift_const)));
    1.63          }
    1.64        } else {
    1.65          // No add is required, we can merge the shifts together.
    1.66 -        mul_hi = phase->transform(new (phase->C, 3) RShiftLNode(mul_hi, phase->intcon(N + shift_const)));
    1.67 -        mul_hi = phase->transform(new (phase->C, 2) ConvL2INode(mul_hi));
    1.68 +        mul_hi = phase->transform(new (phase->C) RShiftLNode(mul_hi, phase->intcon(N + shift_const)));
    1.69 +        mul_hi = phase->transform(new (phase->C) ConvL2INode(mul_hi));
    1.70        }
    1.71  
    1.72        // Get a 0 or -1 from the sign of the dividend.
    1.73        Node *addend0 = mul_hi;
    1.74 -      Node *addend1 = phase->transform(new (phase->C, 3) RShiftINode(dividend, phase->intcon(N-1)));
    1.75 +      Node *addend1 = phase->transform(new (phase->C) RShiftINode(dividend, phase->intcon(N-1)));
    1.76  
    1.77        // If the divisor is negative, swap the order of the input addends;
    1.78        // this has the effect of negating the quotient.
    1.79 @@ -200,7 +200,7 @@
    1.80  
    1.81        // Adjust the final quotient by subtracting -1 (adding 1)
    1.82        // from the mul_hi.
    1.83 -      q = new (phase->C, 3) SubINode(addend0, addend1);
    1.84 +      q = new (phase->C) SubINode(addend0, addend1);
    1.85      }
    1.86    }
    1.87  
    1.88 @@ -259,7 +259,7 @@
    1.89    // no need to synthesize it in ideal nodes.
    1.90    if (Matcher::has_match_rule(Op_MulHiL)) {
    1.91      Node* v = phase->longcon(magic_const);
    1.92 -    return new (phase->C, 3) MulHiLNode(dividend, v);
    1.93 +    return new (phase->C) MulHiLNode(dividend, v);
    1.94    }
    1.95  
    1.96    // Taken from Hacker's Delight, Fig. 8-2. Multiply high signed.
    1.97 @@ -285,11 +285,11 @@
    1.98    const int N = 64;
    1.99  
   1.100    // Dummy node to keep intermediate nodes alive during construction
   1.101 -  Node* hook = new (phase->C, 4) Node(4);
   1.102 +  Node* hook = new (phase->C) Node(4);
   1.103  
   1.104    // u0 = u & 0xFFFFFFFF;  u1 = u >> 32;
   1.105 -  Node* u0 = phase->transform(new (phase->C, 3) AndLNode(dividend, phase->longcon(0xFFFFFFFF)));
   1.106 -  Node* u1 = phase->transform(new (phase->C, 3) RShiftLNode(dividend, phase->intcon(N / 2)));
   1.107 +  Node* u0 = phase->transform(new (phase->C) AndLNode(dividend, phase->longcon(0xFFFFFFFF)));
   1.108 +  Node* u1 = phase->transform(new (phase->C) RShiftLNode(dividend, phase->intcon(N / 2)));
   1.109    hook->init_req(0, u0);
   1.110    hook->init_req(1, u1);
   1.111  
   1.112 @@ -298,29 +298,29 @@
   1.113    Node* v1 = phase->longcon(magic_const >> (N / 2));
   1.114  
   1.115    // w0 = u0*v0;
   1.116 -  Node* w0 = phase->transform(new (phase->C, 3) MulLNode(u0, v0));
   1.117 +  Node* w0 = phase->transform(new (phase->C) MulLNode(u0, v0));
   1.118  
   1.119    // t = u1*v0 + (w0 >> 32);
   1.120 -  Node* u1v0 = phase->transform(new (phase->C, 3) MulLNode(u1, v0));
   1.121 -  Node* temp = phase->transform(new (phase->C, 3) URShiftLNode(w0, phase->intcon(N / 2)));
   1.122 -  Node* t    = phase->transform(new (phase->C, 3) AddLNode(u1v0, temp));
   1.123 +  Node* u1v0 = phase->transform(new (phase->C) MulLNode(u1, v0));
   1.124 +  Node* temp = phase->transform(new (phase->C) URShiftLNode(w0, phase->intcon(N / 2)));
   1.125 +  Node* t    = phase->transform(new (phase->C) AddLNode(u1v0, temp));
   1.126    hook->init_req(2, t);
   1.127  
   1.128    // w1 = t & 0xFFFFFFFF;
   1.129 -  Node* w1 = phase->transform(new (phase->C, 3) AndLNode(t, phase->longcon(0xFFFFFFFF)));
   1.130 +  Node* w1 = phase->transform(new (phase->C) AndLNode(t, phase->longcon(0xFFFFFFFF)));
   1.131    hook->init_req(3, w1);
   1.132  
   1.133    // w2 = t >> 32;
   1.134 -  Node* w2 = phase->transform(new (phase->C, 3) RShiftLNode(t, phase->intcon(N / 2)));
   1.135 +  Node* w2 = phase->transform(new (phase->C) RShiftLNode(t, phase->intcon(N / 2)));
   1.136  
   1.137    // w1 = u0*v1 + w1;
   1.138 -  Node* u0v1 = phase->transform(new (phase->C, 3) MulLNode(u0, v1));
   1.139 -  w1         = phase->transform(new (phase->C, 3) AddLNode(u0v1, w1));
   1.140 +  Node* u0v1 = phase->transform(new (phase->C) MulLNode(u0, v1));
   1.141 +  w1         = phase->transform(new (phase->C) AddLNode(u0v1, w1));
   1.142  
   1.143    // return u1*v1 + w2 + (w1 >> 32);
   1.144 -  Node* u1v1  = phase->transform(new (phase->C, 3) MulLNode(u1, v1));
   1.145 -  Node* temp1 = phase->transform(new (phase->C, 3) AddLNode(u1v1, w2));
   1.146 -  Node* temp2 = phase->transform(new (phase->C, 3) RShiftLNode(w1, phase->intcon(N / 2)));
   1.147 +  Node* u1v1  = phase->transform(new (phase->C) MulLNode(u1, v1));
   1.148 +  Node* temp1 = phase->transform(new (phase->C) AddLNode(u1v1, w2));
   1.149 +  Node* temp2 = phase->transform(new (phase->C) RShiftLNode(w1, phase->intcon(N / 2)));
   1.150  
   1.151    // Remove the bogus extra edges used to keep things alive
   1.152    PhaseIterGVN* igvn = phase->is_IterGVN();
   1.153 @@ -332,7 +332,7 @@
   1.154      }
   1.155    }
   1.156  
   1.157 -  return new (phase->C, 3) AddLNode(temp1, temp2);
   1.158 +  return new (phase->C) AddLNode(temp1, temp2);
   1.159  }
   1.160  
   1.161  
   1.162 @@ -355,7 +355,7 @@
   1.163      // division by +/- 1
   1.164      if (!d_pos) {
   1.165        // Just negate the value
   1.166 -      q = new (phase->C, 3) SubLNode(phase->longcon(0), dividend);
   1.167 +      q = new (phase->C) SubLNode(phase->longcon(0), dividend);
   1.168      }
   1.169    } else if ( is_power_of_2_long(d) ) {
   1.170  
   1.171 @@ -394,18 +394,18 @@
   1.172        // (-2+3)>>2 becomes 0, etc.
   1.173  
   1.174        // Compute 0 or -1, based on sign bit
   1.175 -      Node *sign = phase->transform(new (phase->C, 3) RShiftLNode(dividend, phase->intcon(N - 1)));
   1.176 +      Node *sign = phase->transform(new (phase->C) RShiftLNode(dividend, phase->intcon(N - 1)));
   1.177        // Mask sign bit to the low sign bits
   1.178 -      Node *round = phase->transform(new (phase->C, 3) URShiftLNode(sign, phase->intcon(N - l)));
   1.179 +      Node *round = phase->transform(new (phase->C) URShiftLNode(sign, phase->intcon(N - l)));
   1.180        // Round up before shifting
   1.181 -      dividend = phase->transform(new (phase->C, 3) AddLNode(dividend, round));
   1.182 +      dividend = phase->transform(new (phase->C) AddLNode(dividend, round));
   1.183      }
   1.184  
   1.185      // Shift for division
   1.186 -    q = new (phase->C, 3) RShiftLNode(dividend, phase->intcon(l));
   1.187 +    q = new (phase->C) RShiftLNode(dividend, phase->intcon(l));
   1.188  
   1.189      if (!d_pos) {
   1.190 -      q = new (phase->C, 3) SubLNode(phase->longcon(0), phase->transform(q));
   1.191 +      q = new (phase->C) SubLNode(phase->longcon(0), phase->transform(q));
   1.192      }
   1.193    } else if ( !Matcher::use_asm_for_ldiv_by_con(d) ) { // Use hardware DIV instruction when
   1.194                                                         // it is faster than code generated below.
   1.195 @@ -425,17 +425,17 @@
   1.196          // The magic multiplier is too large for a 64 bit constant. We've adjusted
   1.197          // it down by 2^64, but have to add 1 dividend back in after the multiplication.
   1.198          // This handles the "overflow" case described by Granlund and Montgomery.
   1.199 -        mul_hi = phase->transform(new (phase->C, 3) AddLNode(dividend, mul_hi));
   1.200 +        mul_hi = phase->transform(new (phase->C) AddLNode(dividend, mul_hi));
   1.201        }
   1.202  
   1.203        // Shift over the (adjusted) mulhi
   1.204        if (shift_const != 0) {
   1.205 -        mul_hi = phase->transform(new (phase->C, 3) RShiftLNode(mul_hi, phase->intcon(shift_const)));
   1.206 +        mul_hi = phase->transform(new (phase->C) RShiftLNode(mul_hi, phase->intcon(shift_const)));
   1.207        }
   1.208  
   1.209        // Get a 0 or -1 from the sign of the dividend.
   1.210        Node *addend0 = mul_hi;
   1.211 -      Node *addend1 = phase->transform(new (phase->C, 3) RShiftLNode(dividend, phase->intcon(N-1)));
   1.212 +      Node *addend1 = phase->transform(new (phase->C) RShiftLNode(dividend, phase->intcon(N-1)));
   1.213  
   1.214        // If the divisor is negative, swap the order of the input addends;
   1.215        // this has the effect of negating the quotient.
   1.216 @@ -445,7 +445,7 @@
   1.217  
   1.218        // Adjust the final quotient by subtracting -1 (adding 1)
   1.219        // from the mul_hi.
   1.220 -      q = new (phase->C, 3) SubLNode(addend0, addend1);
   1.221 +      q = new (phase->C) SubLNode(addend0, addend1);
   1.222      }
   1.223    }
   1.224  
   1.225 @@ -735,7 +735,7 @@
   1.226    assert( frexp((double)reciprocal, &exp) == 0.5, "reciprocal should be power of 2" );
   1.227  
   1.228    // return multiplication by the reciprocal
   1.229 -  return (new (phase->C, 3) MulFNode(in(1), phase->makecon(TypeF::make(reciprocal))));
   1.230 +  return (new (phase->C) MulFNode(in(1), phase->makecon(TypeF::make(reciprocal))));
   1.231  }
   1.232  
   1.233  //=============================================================================
   1.234 @@ -829,7 +829,7 @@
   1.235    assert( frexp(reciprocal, &exp) == 0.5, "reciprocal should be power of 2" );
   1.236  
   1.237    // return multiplication by the reciprocal
   1.238 -  return (new (phase->C, 3) MulDNode(in(1), phase->makecon(TypeD::make(reciprocal))));
   1.239 +  return (new (phase->C) MulDNode(in(1), phase->makecon(TypeD::make(reciprocal))));
   1.240  }
   1.241  
   1.242  //=============================================================================
   1.243 @@ -856,7 +856,7 @@
   1.244    if( !ti->is_con() ) return NULL;
   1.245    jint con = ti->get_con();
   1.246  
   1.247 -  Node *hook = new (phase->C, 1) Node(1);
   1.248 +  Node *hook = new (phase->C) Node(1);
   1.249  
   1.250    // First, special check for modulo 2^k-1
   1.251    if( con >= 0 && con < max_jint && is_power_of_2(con+1) ) {
   1.252 @@ -876,24 +876,24 @@
   1.253        hook->init_req(0, x);       // Add a use to x to prevent him from dying
   1.254        // Generate code to reduce X rapidly to nearly 2^k-1.
   1.255        for( int i = 0; i < trip_count; i++ ) {
   1.256 -        Node *xl = phase->transform( new (phase->C, 3) AndINode(x,divisor) );
   1.257 -        Node *xh = phase->transform( new (phase->C, 3) RShiftINode(x,phase->intcon(k)) ); // Must be signed
   1.258 -        x = phase->transform( new (phase->C, 3) AddINode(xh,xl) );
   1.259 +        Node *xl = phase->transform( new (phase->C) AndINode(x,divisor) );
   1.260 +        Node *xh = phase->transform( new (phase->C) RShiftINode(x,phase->intcon(k)) ); // Must be signed
   1.261 +        x = phase->transform( new (phase->C) AddINode(xh,xl) );
   1.262          hook->set_req(0, x);
   1.263        }
   1.264  
   1.265        // Generate sign-fixup code.  Was original value positive?
   1.266        // int hack_res = (i >= 0) ? divisor : 1;
   1.267 -      Node *cmp1 = phase->transform( new (phase->C, 3) CmpINode( in(1), phase->intcon(0) ) );
   1.268 -      Node *bol1 = phase->transform( new (phase->C, 2) BoolNode( cmp1, BoolTest::ge ) );
   1.269 -      Node *cmov1= phase->transform( new (phase->C, 4) CMoveINode(bol1, phase->intcon(1), divisor, TypeInt::POS) );
   1.270 +      Node *cmp1 = phase->transform( new (phase->C) CmpINode( in(1), phase->intcon(0) ) );
   1.271 +      Node *bol1 = phase->transform( new (phase->C) BoolNode( cmp1, BoolTest::ge ) );
   1.272 +      Node *cmov1= phase->transform( new (phase->C) CMoveINode(bol1, phase->intcon(1), divisor, TypeInt::POS) );
   1.273        // if( x >= hack_res ) x -= divisor;
   1.274 -      Node *sub  = phase->transform( new (phase->C, 3) SubINode( x, divisor ) );
   1.275 -      Node *cmp2 = phase->transform( new (phase->C, 3) CmpINode( x, cmov1 ) );
   1.276 -      Node *bol2 = phase->transform( new (phase->C, 2) BoolNode( cmp2, BoolTest::ge ) );
   1.277 +      Node *sub  = phase->transform( new (phase->C) SubINode( x, divisor ) );
   1.278 +      Node *cmp2 = phase->transform( new (phase->C) CmpINode( x, cmov1 ) );
   1.279 +      Node *bol2 = phase->transform( new (phase->C) BoolNode( cmp2, BoolTest::ge ) );
   1.280        // Convention is to not transform the return value of an Ideal
   1.281        // since Ideal is expected to return a modified 'this' or a new node.
   1.282 -      Node *cmov2= new (phase->C, 4) CMoveINode(bol2, x, sub, TypeInt::INT);
   1.283 +      Node *cmov2= new (phase->C) CMoveINode(bol2, x, sub, TypeInt::INT);
   1.284        // cmov2 is now the mod
   1.285  
   1.286        // Now remove the bogus extra edges used to keep things alive
   1.287 @@ -916,7 +916,7 @@
   1.288    jint pos_con = (con >= 0) ? con : -con;
   1.289  
   1.290    // integer Mod 1 is always 0
   1.291 -  if( pos_con == 1 ) return new (phase->C, 1) ConINode(TypeInt::ZERO);
   1.292 +  if( pos_con == 1 ) return new (phase->C) ConINode(TypeInt::ZERO);
   1.293  
   1.294    int log2_con = -1;
   1.295  
   1.296 @@ -929,7 +929,7 @@
   1.297  
   1.298      // See if this can be masked, if the dividend is non-negative
   1.299      if( dti && dti->_lo >= 0 )
   1.300 -      return ( new (phase->C, 3) AndINode( in(1), phase->intcon( pos_con-1 ) ) );
   1.301 +      return ( new (phase->C) AndINode( in(1), phase->intcon( pos_con-1 ) ) );
   1.302    }
   1.303  
   1.304    // Save in(1) so that it cannot be changed or deleted
   1.305 @@ -944,12 +944,12 @@
   1.306      Node *mult = NULL;
   1.307  
   1.308      if( log2_con >= 0 )
   1.309 -      mult = phase->transform( new (phase->C, 3) LShiftINode( divide, phase->intcon( log2_con ) ) );
   1.310 +      mult = phase->transform( new (phase->C) LShiftINode( divide, phase->intcon( log2_con ) ) );
   1.311      else
   1.312 -      mult = phase->transform( new (phase->C, 3) MulINode( divide, phase->intcon( pos_con ) ) );
   1.313 +      mult = phase->transform( new (phase->C) MulINode( divide, phase->intcon( pos_con ) ) );
   1.314  
   1.315      // Finally, subtract the multiplied divided value from the original
   1.316 -    result = new (phase->C, 3) SubINode( in(1), mult );
   1.317 +    result = new (phase->C) SubINode( in(1), mult );
   1.318    }
   1.319  
   1.320    // Now remove the bogus extra edges used to keep things alive
   1.321 @@ -1027,7 +1027,7 @@
   1.322    if( !tl->is_con() ) return NULL;
   1.323    jlong con = tl->get_con();
   1.324  
   1.325 -  Node *hook = new (phase->C, 1) Node(1);
   1.326 +  Node *hook = new (phase->C) Node(1);
   1.327  
   1.328    // Expand mod
   1.329    if( con >= 0 && con < max_jlong && is_power_of_2_long(con+1) ) {
   1.330 @@ -1049,24 +1049,24 @@
   1.331        hook->init_req(0, x);       // Add a use to x to prevent him from dying
   1.332        // Generate code to reduce X rapidly to nearly 2^k-1.
   1.333        for( int i = 0; i < trip_count; i++ ) {
   1.334 -        Node *xl = phase->transform( new (phase->C, 3) AndLNode(x,divisor) );
   1.335 -        Node *xh = phase->transform( new (phase->C, 3) RShiftLNode(x,phase->intcon(k)) ); // Must be signed
   1.336 -        x = phase->transform( new (phase->C, 3) AddLNode(xh,xl) );
   1.337 +        Node *xl = phase->transform( new (phase->C) AndLNode(x,divisor) );
   1.338 +        Node *xh = phase->transform( new (phase->C) RShiftLNode(x,phase->intcon(k)) ); // Must be signed
   1.339 +        x = phase->transform( new (phase->C) AddLNode(xh,xl) );
   1.340          hook->set_req(0, x);    // Add a use to x to prevent him from dying
   1.341        }
   1.342  
   1.343        // Generate sign-fixup code.  Was original value positive?
   1.344        // long hack_res = (i >= 0) ? divisor : CONST64(1);
   1.345 -      Node *cmp1 = phase->transform( new (phase->C, 3) CmpLNode( in(1), phase->longcon(0) ) );
   1.346 -      Node *bol1 = phase->transform( new (phase->C, 2) BoolNode( cmp1, BoolTest::ge ) );
   1.347 -      Node *cmov1= phase->transform( new (phase->C, 4) CMoveLNode(bol1, phase->longcon(1), divisor, TypeLong::LONG) );
   1.348 +      Node *cmp1 = phase->transform( new (phase->C) CmpLNode( in(1), phase->longcon(0) ) );
   1.349 +      Node *bol1 = phase->transform( new (phase->C) BoolNode( cmp1, BoolTest::ge ) );
   1.350 +      Node *cmov1= phase->transform( new (phase->C) CMoveLNode(bol1, phase->longcon(1), divisor, TypeLong::LONG) );
   1.351        // if( x >= hack_res ) x -= divisor;
   1.352 -      Node *sub  = phase->transform( new (phase->C, 3) SubLNode( x, divisor ) );
   1.353 -      Node *cmp2 = phase->transform( new (phase->C, 3) CmpLNode( x, cmov1 ) );
   1.354 -      Node *bol2 = phase->transform( new (phase->C, 2) BoolNode( cmp2, BoolTest::ge ) );
   1.355 +      Node *sub  = phase->transform( new (phase->C) SubLNode( x, divisor ) );
   1.356 +      Node *cmp2 = phase->transform( new (phase->C) CmpLNode( x, cmov1 ) );
   1.357 +      Node *bol2 = phase->transform( new (phase->C) BoolNode( cmp2, BoolTest::ge ) );
   1.358        // Convention is to not transform the return value of an Ideal
   1.359        // since Ideal is expected to return a modified 'this' or a new node.
   1.360 -      Node *cmov2= new (phase->C, 4) CMoveLNode(bol2, x, sub, TypeLong::LONG);
   1.361 +      Node *cmov2= new (phase->C) CMoveLNode(bol2, x, sub, TypeLong::LONG);
   1.362        // cmov2 is now the mod
   1.363  
   1.364        // Now remove the bogus extra edges used to keep things alive
   1.365 @@ -1089,7 +1089,7 @@
   1.366    jlong pos_con = (con >= 0) ? con : -con;
   1.367  
   1.368    // integer Mod 1 is always 0
   1.369 -  if( pos_con == 1 ) return new (phase->C, 1) ConLNode(TypeLong::ZERO);
   1.370 +  if( pos_con == 1 ) return new (phase->C) ConLNode(TypeLong::ZERO);
   1.371  
   1.372    int log2_con = -1;
   1.373  
   1.374 @@ -1102,7 +1102,7 @@
   1.375  
   1.376      // See if this can be masked, if the dividend is non-negative
   1.377      if( dtl && dtl->_lo >= 0 )
   1.378 -      return ( new (phase->C, 3) AndLNode( in(1), phase->longcon( pos_con-1 ) ) );
   1.379 +      return ( new (phase->C) AndLNode( in(1), phase->longcon( pos_con-1 ) ) );
   1.380    }
   1.381  
   1.382    // Save in(1) so that it cannot be changed or deleted
   1.383 @@ -1117,12 +1117,12 @@
   1.384      Node *mult = NULL;
   1.385  
   1.386      if( log2_con >= 0 )
   1.387 -      mult = phase->transform( new (phase->C, 3) LShiftLNode( divide, phase->intcon( log2_con ) ) );
   1.388 +      mult = phase->transform( new (phase->C) LShiftLNode( divide, phase->intcon( log2_con ) ) );
   1.389      else
   1.390 -      mult = phase->transform( new (phase->C, 3) MulLNode( divide, phase->longcon( pos_con ) ) );
   1.391 +      mult = phase->transform( new (phase->C) MulLNode( divide, phase->longcon( pos_con ) ) );
   1.392  
   1.393      // Finally, subtract the multiplied divided value from the original
   1.394 -    result = new (phase->C, 3) SubLNode( in(1), mult );
   1.395 +    result = new (phase->C) SubLNode( in(1), mult );
   1.396    }
   1.397  
   1.398    // Now remove the bogus extra edges used to keep things alive
   1.399 @@ -1277,9 +1277,9 @@
   1.400    assert(n->Opcode() == Op_DivI || n->Opcode() == Op_ModI,
   1.401           "only div or mod input pattern accepted");
   1.402  
   1.403 -  DivModINode* divmod = new (C, 3) DivModINode(n->in(0), n->in(1), n->in(2));
   1.404 -  Node*        dproj  = new (C, 1) ProjNode(divmod, DivModNode::div_proj_num);
   1.405 -  Node*        mproj  = new (C, 1) ProjNode(divmod, DivModNode::mod_proj_num);
   1.406 +  DivModINode* divmod = new (C) DivModINode(n->in(0), n->in(1), n->in(2));
   1.407 +  Node*        dproj  = new (C) ProjNode(divmod, DivModNode::div_proj_num);
   1.408 +  Node*        mproj  = new (C) ProjNode(divmod, DivModNode::mod_proj_num);
   1.409    return divmod;
   1.410  }
   1.411  
   1.412 @@ -1289,9 +1289,9 @@
   1.413    assert(n->Opcode() == Op_DivL || n->Opcode() == Op_ModL,
   1.414           "only div or mod input pattern accepted");
   1.415  
   1.416 -  DivModLNode* divmod = new (C, 3) DivModLNode(n->in(0), n->in(1), n->in(2));
   1.417 -  Node*        dproj  = new (C, 1) ProjNode(divmod, DivModNode::div_proj_num);
   1.418 -  Node*        mproj  = new (C, 1) ProjNode(divmod, DivModNode::mod_proj_num);
   1.419 +  DivModLNode* divmod = new (C) DivModLNode(n->in(0), n->in(1), n->in(2));
   1.420 +  Node*        dproj  = new (C) ProjNode(divmod, DivModNode::div_proj_num);
   1.421 +  Node*        mproj  = new (C) ProjNode(divmod, DivModNode::mod_proj_num);
   1.422    return divmod;
   1.423  }
   1.424  
   1.425 @@ -1306,7 +1306,7 @@
   1.426      assert(proj->_con == mod_proj_num, "must be div or mod projection");
   1.427      rm = match->modI_proj_mask();
   1.428    }
   1.429 -  return new (match->C, 1)MachProjNode(this, proj->_con, rm, ideal_reg);
   1.430 +  return new (match->C)MachProjNode(this, proj->_con, rm, ideal_reg);
   1.431  }
   1.432  
   1.433  
   1.434 @@ -1321,5 +1321,5 @@
   1.435      assert(proj->_con == mod_proj_num, "must be div or mod projection");
   1.436      rm = match->modL_proj_mask();
   1.437    }
   1.438 -  return new (match->C, 1)MachProjNode(this, proj->_con, rm, ideal_reg);
   1.439 +  return new (match->C)MachProjNode(this, proj->_con, rm, ideal_reg);
   1.440  }

mercurial