1 /*
2 * Copyright (c) 1997, 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 *
155
156 // Check constraints after parsing
157 virtual bool verify() { return true; }
158
159 virtual void dump() { output(stderr); } // Debug printer
160 // Write info to output files
161 virtual void output(FILE *fp) { fprintf(fp,"Form Output"); }
162
163 public:
164 // ADLC types, match the last character on ideal operands and instructions
165 enum DataType {
166 none = 0, // Not a simple type
167 idealI = 1, // Integer type
168 idealP = 2, // Pointer types, oop(s)
169 idealL = 3, // Long type
170 idealF = 4, // Float type
171 idealD = 5, // Double type
172 idealB = 6, // Byte type
173 idealC = 7, // Char type
174 idealS = 8, // String type
175 idealN = 9 // Narrow oop types
176 };
177 // Convert ideal name to a DataType, return DataType::none if not a 'ConX'
178 Form::DataType ideal_to_const_type(const char *ideal_type_name) const;
179 // Convert ideal name to a DataType, return DataType::none if not a 'sRegX
180 Form::DataType ideal_to_sReg_type(const char *name) const;
181 // Convert ideal name to a DataType, return DataType::none if not a 'RegX
182 Form::DataType ideal_to_Reg_type(const char *name) const;
183
184 // Convert ideal name to a DataType, return DataType::none if not a 'LoadX
185 Form::DataType is_load_from_memory(const char *opType) const;
186 // Convert ideal name to a DataType, return DataType::none if not a 'StoreX
187 Form::DataType is_store_to_memory(const char *opType) const;
188
189 // ADLC call types, matched with ideal world
190 enum CallType {
191 invalid_type = 0, // invalid call type
192 JAVA_STATIC = 1, // monomorphic entry
193 JAVA_DYNAMIC = 2, // possibly megamorphic, inline cache call
194 JAVA_COMPILED = 3, // callee will be compiled java
195 JAVA_INTERP = 4, // callee will be executed by interpreter
|
1 /*
2 * Copyright (c) 1997, 2012, 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 *
155
156 // Check constraints after parsing
157 virtual bool verify() { return true; }
158
159 virtual void dump() { output(stderr); } // Debug printer
160 // Write info to output files
161 virtual void output(FILE *fp) { fprintf(fp,"Form Output"); }
162
163 public:
164 // ADLC types, match the last character on ideal operands and instructions
165 enum DataType {
166 none = 0, // Not a simple type
167 idealI = 1, // Integer type
168 idealP = 2, // Pointer types, oop(s)
169 idealL = 3, // Long type
170 idealF = 4, // Float type
171 idealD = 5, // Double type
172 idealB = 6, // Byte type
173 idealC = 7, // Char type
174 idealS = 8, // String type
175 idealN = 9, // Narrow oop types
176 idealV = 10 // Vector type
177 };
178 // Convert ideal name to a DataType, return DataType::none if not a 'ConX'
179 Form::DataType ideal_to_const_type(const char *ideal_type_name) const;
180 // Convert ideal name to a DataType, return DataType::none if not a 'sRegX
181 Form::DataType ideal_to_sReg_type(const char *name) const;
182 // Convert ideal name to a DataType, return DataType::none if not a 'RegX
183 Form::DataType ideal_to_Reg_type(const char *name) const;
184
185 // Convert ideal name to a DataType, return DataType::none if not a 'LoadX
186 Form::DataType is_load_from_memory(const char *opType) const;
187 // Convert ideal name to a DataType, return DataType::none if not a 'StoreX
188 Form::DataType is_store_to_memory(const char *opType) const;
189
190 // ADLC call types, matched with ideal world
191 enum CallType {
192 invalid_type = 0, // invalid call type
193 JAVA_STATIC = 1, // monomorphic entry
194 JAVA_DYNAMIC = 2, // possibly megamorphic, inline cache call
195 JAVA_COMPILED = 3, // callee will be compiled java
196 JAVA_INTERP = 4, // callee will be executed by interpreter
|