Mercurial > hg > truffle
comparison src/share/vm/opto/matcher.cpp @ 14392:b5c8a61d7fa0
Merge
author | kvn |
---|---|
date | Fri, 21 Jun 2013 15:56:24 -0700 |
parents | d2907f74462e f2110083203d |
children | f4f6ae481e1a |
comparison
equal
deleted
inserted
replaced
14391:d2907f74462e | 14392:b5c8a61d7fa0 |
---|---|
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. |
318 // _shared[_idx] is cleared is guaranteed to not be shared, and thus | 318 // _shared[_idx] is cleared is guaranteed to not be shared, and thus |
319 // can be a valid interior of some tree. | 319 // can be a valid interior of some tree. |
320 find_shared( C->root() ); | 320 find_shared( C->root() ); |
321 find_shared( C->top() ); | 321 find_shared( C->top() ); |
322 | 322 |
323 C->print_method("Before Matching"); | 323 C->print_method(PHASE_BEFORE_MATCHING); |
324 | 324 |
325 // Create new ideal node ConP #NULL even if it does exist in old space | 325 // Create new ideal node ConP #NULL even if it does exist in old space |
326 // to avoid false sharing if the corresponding mach node is not used. | 326 // to avoid false sharing if the corresponding mach node is not used. |
327 // The corresponding mach node is only used in rare cases for derived | 327 // The corresponding mach node is only used in rare cases for derived |
328 // pointers. | 328 // pointers. |
1283 // Compute number of stack slots needed to restore stack in case of | 1283 // Compute number of stack slots needed to restore stack in case of |
1284 // Pascal-style argument popping. | 1284 // Pascal-style argument popping. |
1285 mcall->_argsize = out_arg_limit_per_call - begin_out_arg_area; | 1285 mcall->_argsize = out_arg_limit_per_call - begin_out_arg_area; |
1286 } | 1286 } |
1287 | 1287 |
1288 if (is_method_handle_invoke) { | |
1289 // Kill some extra stack space in case method handles want to do | |
1290 // a little in-place argument insertion. | |
1291 // FIXME: Is this still necessary? | |
1292 int regs_per_word = NOT_LP64(1) LP64_ONLY(2); // %%% make a global const! | |
1293 out_arg_limit_per_call += Method::extra_stack_entries() * regs_per_word; | |
1294 // Do not update mcall->_argsize because (a) the extra space is not | |
1295 // pushed as arguments and (b) _argsize is dead (not used anywhere). | |
1296 } | |
1297 | |
1298 // Compute the max stack slot killed by any call. These will not be | 1288 // Compute the max stack slot killed by any call. These will not be |
1299 // available for debug info, and will be used to adjust FIRST_STACK_mask | 1289 // available for debug info, and will be used to adjust FIRST_STACK_mask |
1300 // after all call sites have been visited. | 1290 // after all call sites have been visited. |
1301 if( _out_arg_limit < out_arg_limit_per_call) | 1291 if( _out_arg_limit < out_arg_limit_per_call) |
1302 _out_arg_limit = out_arg_limit_per_call; | 1292 _out_arg_limit = out_arg_limit_per_call; |
1859 } | 1849 } |
1860 } | 1850 } |
1861 | 1851 |
1862 for( uint i=0; kid != NULL && i<2; kid = s->_kids[1], i++ ) { // binary tree | 1852 for( uint i=0; kid != NULL && i<2; kid = s->_kids[1], i++ ) { // binary tree |
1863 int newrule; | 1853 int newrule; |
1864 if( i == 0 ) | 1854 if( i == 0) |
1865 newrule = kid->_rule[_leftOp[rule]]; | 1855 newrule = kid->_rule[_leftOp[rule]]; |
1866 else | 1856 else |
1867 newrule = kid->_rule[_rightOp[rule]]; | 1857 newrule = kid->_rule[_rightOp[rule]]; |
1868 | 1858 |
1869 if( newrule < _LAST_MACH_OPER ) { // Operand or instruction? | 1859 if( newrule < _LAST_MACH_OPER ) { // Operand or instruction? |