Mercurial > hg > truffle
comparison src/share/vm/opto/matcher.cpp @ 10408:836a62f43af9
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 10:45:56 +0200 |
parents | f2110083203d |
children | ac91879aa56f b5c8a61d7fa0 |
comparison
equal
deleted
inserted
replaced
10086:e0fb8a213650 | 10408:836a62f43af9 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, 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. |
315 // _shared[_idx] is cleared is guaranteed to not be shared, and thus | 315 // _shared[_idx] is cleared is guaranteed to not be shared, and thus |
316 // can be a valid interior of some tree. | 316 // can be a valid interior of some tree. |
317 find_shared( C->root() ); | 317 find_shared( C->root() ); |
318 find_shared( C->top() ); | 318 find_shared( C->top() ); |
319 | 319 |
320 C->print_method("Before Matching"); | 320 C->print_method(PHASE_BEFORE_MATCHING); |
321 | 321 |
322 // Create new ideal node ConP #NULL even if it does exist in old space | 322 // Create new ideal node ConP #NULL even if it does exist in old space |
323 // to avoid false sharing if the corresponding mach node is not used. | 323 // to avoid false sharing if the corresponding mach node is not used. |
324 // The corresponding mach node is only used in rare cases for derived | 324 // The corresponding mach node is only used in rare cases for derived |
325 // pointers. | 325 // pointers. |
1280 // Compute number of stack slots needed to restore stack in case of | 1280 // Compute number of stack slots needed to restore stack in case of |
1281 // Pascal-style argument popping. | 1281 // Pascal-style argument popping. |
1282 mcall->_argsize = out_arg_limit_per_call - begin_out_arg_area; | 1282 mcall->_argsize = out_arg_limit_per_call - begin_out_arg_area; |
1283 } | 1283 } |
1284 | 1284 |
1285 if (is_method_handle_invoke) { | |
1286 // Kill some extra stack space in case method handles want to do | |
1287 // a little in-place argument insertion. | |
1288 // FIXME: Is this still necessary? | |
1289 int regs_per_word = NOT_LP64(1) LP64_ONLY(2); // %%% make a global const! | |
1290 out_arg_limit_per_call += Method::extra_stack_entries() * regs_per_word; | |
1291 // Do not update mcall->_argsize because (a) the extra space is not | |
1292 // pushed as arguments and (b) _argsize is dead (not used anywhere). | |
1293 } | |
1294 | |
1295 // Compute the max stack slot killed by any call. These will not be | 1285 // Compute the max stack slot killed by any call. These will not be |
1296 // available for debug info, and will be used to adjust FIRST_STACK_mask | 1286 // available for debug info, and will be used to adjust FIRST_STACK_mask |
1297 // after all call sites have been visited. | 1287 // after all call sites have been visited. |
1298 if( _out_arg_limit < out_arg_limit_per_call) | 1288 if( _out_arg_limit < out_arg_limit_per_call) |
1299 _out_arg_limit = out_arg_limit_per_call; | 1289 _out_arg_limit = out_arg_limit_per_call; |
1856 } | 1846 } |
1857 } | 1847 } |
1858 | 1848 |
1859 for( uint i=0; kid != NULL && i<2; kid = s->_kids[1], i++ ) { // binary tree | 1849 for( uint i=0; kid != NULL && i<2; kid = s->_kids[1], i++ ) { // binary tree |
1860 int newrule; | 1850 int newrule; |
1861 if( i == 0 ) | 1851 if( i == 0) |
1862 newrule = kid->_rule[_leftOp[rule]]; | 1852 newrule = kid->_rule[_leftOp[rule]]; |
1863 else | 1853 else |
1864 newrule = kid->_rule[_rightOp[rule]]; | 1854 newrule = kid->_rule[_rightOp[rule]]; |
1865 | 1855 |
1866 if( newrule < _LAST_MACH_OPER ) { // Operand or instruction? | 1856 if( newrule < _LAST_MACH_OPER ) { // Operand or instruction? |