1 /* 2 * Copyright (c) 2005, 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/_idealKit.cpp.incl" 27 28 // Static initialization 29 30 // This declares the position where vars are kept in the cvstate 31 // For some degree of consistency we use the TypeFunc enum to 32 // soak up spots in the inputs even though we only use early Control 33 // and Memory slots. (So far.) 34 const uint IdealKit::first_var = TypeFunc::Parms + 1; 35 36 //----------------------------IdealKit----------------------------------------- 37 IdealKit::IdealKit(PhaseGVN &gvn, Node* control, Node* mem, bool delay_all_transforms, bool has_declarations) : 38 _gvn(gvn), C(gvn.C) { 39 _initial_ctrl = control; 40 _initial_memory = mem; 41 _delay_all_transforms = delay_all_transforms; 42 _var_ct = 0; 43 _cvstate = NULL; 44 // We can go memory state free or else we need the entire memory state 45 assert(mem == NULL || mem->Opcode() == Op_MergeMem, "memory must be pre-split"); 46 int init_size = 5; | 1 /* 2 * Copyright (c) 2005, 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 "opto/addnode.hpp" 27 #include "opto/callnode.hpp" 28 #include "opto/cfgnode.hpp" 29 #include "opto/idealKit.hpp" 30 #include "opto/runtime.hpp" 31 32 // Static initialization 33 34 // This declares the position where vars are kept in the cvstate 35 // For some degree of consistency we use the TypeFunc enum to 36 // soak up spots in the inputs even though we only use early Control 37 // and Memory slots. (So far.) 38 const uint IdealKit::first_var = TypeFunc::Parms + 1; 39 40 //----------------------------IdealKit----------------------------------------- 41 IdealKit::IdealKit(PhaseGVN &gvn, Node* control, Node* mem, bool delay_all_transforms, bool has_declarations) : 42 _gvn(gvn), C(gvn.C) { 43 _initial_ctrl = control; 44 _initial_memory = mem; 45 _delay_all_transforms = delay_all_transforms; 46 _var_ct = 0; 47 _cvstate = NULL; 48 // We can go memory state free or else we need the entire memory state 49 assert(mem == NULL || mem->Opcode() == Op_MergeMem, "memory must be pre-split"); 50 int init_size = 5; |