1 /* 2 * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_postaloc.cpp.incl" 27 28 // see if this register kind does not requires two registers 29 static bool is_single_register(uint x) { 30 #ifdef _LP64 31 return (x != Op_RegD && x != Op_RegL && x != Op_RegP); 32 #else 33 return (x != Op_RegD && x != Op_RegL); 34 #endif 35 } 36 37 //---------------------------may_be_copy_of_callee----------------------------- 38 // Check to see if we can possibly be a copy of a callee-save value. 39 bool PhaseChaitin::may_be_copy_of_callee( Node *def ) const { 40 // Short circuit if there are no callee save registers 41 if (_matcher.number_of_saved_registers() == 0) return false; 42 43 // Expect only a spill-down and reload on exit for callee-save spills. 44 // Chains of copies cannot be deep. 45 // 5008997 - This is wishful thinking. Register allocator seems to 46 // be splitting live ranges for callee save registers to such | 1 /* 2 * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "memory/allocation.inline.hpp" 27 #include "opto/chaitin.hpp" 28 #include "opto/machnode.hpp" 29 30 // see if this register kind does not requires two registers 31 static bool is_single_register(uint x) { 32 #ifdef _LP64 33 return (x != Op_RegD && x != Op_RegL && x != Op_RegP); 34 #else 35 return (x != Op_RegD && x != Op_RegL); 36 #endif 37 } 38 39 //---------------------------may_be_copy_of_callee----------------------------- 40 // Check to see if we can possibly be a copy of a callee-save value. 41 bool PhaseChaitin::may_be_copy_of_callee( Node *def ) const { 42 // Short circuit if there are no callee save registers 43 if (_matcher.number_of_saved_registers() == 0) return false; 44 45 // Expect only a spill-down and reload on exit for callee-save spills. 46 // Chains of copies cannot be deep. 47 // 5008997 - This is wishful thinking. Register allocator seems to 48 // be splitting live ranges for callee save registers to such |