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 *
143 virtual bool is_parm(FormDict &globals); // node matches ideal 'Parm'
144 // ideal opcode enumeration
145 virtual const char *ideal_Opcode(FormDict &globals) const;
146 virtual int is_expensive() const; // node matches ideal 'CosD'
147 virtual int is_empty_encoding() const; // _size=0 and/or _insencode empty
148 virtual int is_tls_instruction() const; // tlsLoadP rule or ideal ThreadLocal
149 virtual int is_ideal_copy() const; // node matches ideal 'Copy*'
150 virtual bool is_ideal_if() const; // node matches ideal 'If'
151 virtual bool is_ideal_fastlock() const; // node matches 'FastLock'
152 virtual bool is_ideal_membar() const; // node matches ideal 'MemBarXXX'
153 virtual bool is_ideal_loadPC() const; // node matches ideal 'LoadPC'
154 virtual bool is_ideal_box() const; // node matches ideal 'Box'
155 virtual bool is_ideal_goto() const; // node matches ideal 'Goto'
156 virtual bool is_ideal_branch() const; // "" 'If' | 'Goto' | 'LoopEnd' | 'Jump'
157 virtual bool is_ideal_jump() const; // node matches ideal 'Jump'
158 virtual bool is_ideal_return() const; // node matches ideal 'Return'
159 virtual bool is_ideal_halt() const; // node matches ideal 'Halt'
160 virtual bool is_ideal_safepoint() const; // node matches 'SafePoint'
161 virtual bool is_ideal_nop() const; // node matches 'Nop'
162 virtual bool is_ideal_control() const; // control node
163
164 virtual Form::CallType is_ideal_call() const; // matches ideal 'Call'
165 virtual Form::DataType is_ideal_load() const; // node matches ideal 'LoadXNode'
166 // Should antidep checks be disabled for this Instruct
167 // See definition of MatchRule::skip_antidep_check
168 bool skip_antidep_check() const;
169 virtual Form::DataType is_ideal_store() const;// node matches ideal 'StoreXNode'
170 bool is_ideal_mem() const { return is_ideal_load() != Form::none || is_ideal_store() != Form::none; }
171 virtual uint two_address(FormDict &globals); // output reg must match input reg
172 // when chaining a constant to an instruction, return 'true' and set opType
173 virtual Form::DataType is_chain_of_constant(FormDict &globals);
174 virtual Form::DataType is_chain_of_constant(FormDict &globals, const char * &opType);
175 virtual Form::DataType is_chain_of_constant(FormDict &globals, const char * &opType, const char * &result_type);
176
177 // Check if a simple chain rule
178 virtual bool is_simple_chain_rule(FormDict &globals) const;
179
180 // check for structural rematerialization
181 virtual bool rematerialize(FormDict &globals, RegisterForm *registers);
182
994 // Recursive call on all operands' match rules in my match rule.
995 bool base_operand(uint &position, FormDict &globals,
996 const char * &result, const char * &name,
997 const char * &opType) const;
998
999
1000 bool is_base_register(FormDict &globals) const;
1001 Form::DataType is_base_constant(FormDict &globals) const;
1002 bool is_chain_rule(FormDict &globals) const;
1003 int is_ideal_copy() const;
1004 int is_expensive() const; // node matches ideal 'CosD'
1005 bool is_ideal_if() const; // node matches ideal 'If'
1006 bool is_ideal_fastlock() const; // node matches ideal 'FastLock'
1007 bool is_ideal_jump() const; // node matches ideal 'Jump'
1008 bool is_ideal_membar() const; // node matches ideal 'MemBarXXX'
1009 bool is_ideal_loadPC() const; // node matches ideal 'LoadPC'
1010 bool is_ideal_box() const; // node matches ideal 'Box'
1011 bool is_ideal_goto() const; // node matches ideal 'Goto'
1012 bool is_ideal_loopEnd() const; // node matches ideal 'LoopEnd'
1013 bool is_ideal_bool() const; // node matches ideal 'Bool'
1014 Form::DataType is_ideal_load() const;// node matches ideal 'LoadXNode'
1015 // Should antidep checks be disabled for this rule
1016 // See definition of MatchRule::skip_antidep_check
1017 bool skip_antidep_check() const;
1018 Form::DataType is_ideal_store() const;// node matches ideal 'StoreXNode'
1019
1020 // Check if 'mRule2' is a cisc-spill variant of this MatchRule
1021 int matchrule_cisc_spill_match(FormDict &globals, RegisterForm* registers,
1022 MatchRule* mRule2, const char* &operand,
1023 const char* ®_type);
1024
1025 // Check if 'mRule2' is equivalent to this MatchRule
1026 virtual bool equivalent(FormDict& globals, MatchNode* mRule2);
1027
1028 void matchrule_swap_commutative_op(const char* instr_ident, int count, int& match_rules_cnt);
1029
1030 void dump();
1031 void output(FILE *fp);
1032 };
1033
|
1 /*
2 * Copyright (c) 1998, 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 *
143 virtual bool is_parm(FormDict &globals); // node matches ideal 'Parm'
144 // ideal opcode enumeration
145 virtual const char *ideal_Opcode(FormDict &globals) const;
146 virtual int is_expensive() const; // node matches ideal 'CosD'
147 virtual int is_empty_encoding() const; // _size=0 and/or _insencode empty
148 virtual int is_tls_instruction() const; // tlsLoadP rule or ideal ThreadLocal
149 virtual int is_ideal_copy() const; // node matches ideal 'Copy*'
150 virtual bool is_ideal_if() const; // node matches ideal 'If'
151 virtual bool is_ideal_fastlock() const; // node matches 'FastLock'
152 virtual bool is_ideal_membar() const; // node matches ideal 'MemBarXXX'
153 virtual bool is_ideal_loadPC() const; // node matches ideal 'LoadPC'
154 virtual bool is_ideal_box() const; // node matches ideal 'Box'
155 virtual bool is_ideal_goto() const; // node matches ideal 'Goto'
156 virtual bool is_ideal_branch() const; // "" 'If' | 'Goto' | 'LoopEnd' | 'Jump'
157 virtual bool is_ideal_jump() const; // node matches ideal 'Jump'
158 virtual bool is_ideal_return() const; // node matches ideal 'Return'
159 virtual bool is_ideal_halt() const; // node matches ideal 'Halt'
160 virtual bool is_ideal_safepoint() const; // node matches 'SafePoint'
161 virtual bool is_ideal_nop() const; // node matches 'Nop'
162 virtual bool is_ideal_control() const; // control node
163 virtual bool is_vector() const; // vector instruction
164
165 virtual Form::CallType is_ideal_call() const; // matches ideal 'Call'
166 virtual Form::DataType is_ideal_load() const; // node matches ideal 'LoadXNode'
167 // Should antidep checks be disabled for this Instruct
168 // See definition of MatchRule::skip_antidep_check
169 bool skip_antidep_check() const;
170 virtual Form::DataType is_ideal_store() const;// node matches ideal 'StoreXNode'
171 bool is_ideal_mem() const { return is_ideal_load() != Form::none || is_ideal_store() != Form::none; }
172 virtual uint two_address(FormDict &globals); // output reg must match input reg
173 // when chaining a constant to an instruction, return 'true' and set opType
174 virtual Form::DataType is_chain_of_constant(FormDict &globals);
175 virtual Form::DataType is_chain_of_constant(FormDict &globals, const char * &opType);
176 virtual Form::DataType is_chain_of_constant(FormDict &globals, const char * &opType, const char * &result_type);
177
178 // Check if a simple chain rule
179 virtual bool is_simple_chain_rule(FormDict &globals) const;
180
181 // check for structural rematerialization
182 virtual bool rematerialize(FormDict &globals, RegisterForm *registers);
183
995 // Recursive call on all operands' match rules in my match rule.
996 bool base_operand(uint &position, FormDict &globals,
997 const char * &result, const char * &name,
998 const char * &opType) const;
999
1000
1001 bool is_base_register(FormDict &globals) const;
1002 Form::DataType is_base_constant(FormDict &globals) const;
1003 bool is_chain_rule(FormDict &globals) const;
1004 int is_ideal_copy() const;
1005 int is_expensive() const; // node matches ideal 'CosD'
1006 bool is_ideal_if() const; // node matches ideal 'If'
1007 bool is_ideal_fastlock() const; // node matches ideal 'FastLock'
1008 bool is_ideal_jump() const; // node matches ideal 'Jump'
1009 bool is_ideal_membar() const; // node matches ideal 'MemBarXXX'
1010 bool is_ideal_loadPC() const; // node matches ideal 'LoadPC'
1011 bool is_ideal_box() const; // node matches ideal 'Box'
1012 bool is_ideal_goto() const; // node matches ideal 'Goto'
1013 bool is_ideal_loopEnd() const; // node matches ideal 'LoopEnd'
1014 bool is_ideal_bool() const; // node matches ideal 'Bool'
1015 bool is_vector() const; // vector instruction
1016 Form::DataType is_ideal_load() const;// node matches ideal 'LoadXNode'
1017 // Should antidep checks be disabled for this rule
1018 // See definition of MatchRule::skip_antidep_check
1019 bool skip_antidep_check() const;
1020 Form::DataType is_ideal_store() const;// node matches ideal 'StoreXNode'
1021
1022 // Check if 'mRule2' is a cisc-spill variant of this MatchRule
1023 int matchrule_cisc_spill_match(FormDict &globals, RegisterForm* registers,
1024 MatchRule* mRule2, const char* &operand,
1025 const char* ®_type);
1026
1027 // Check if 'mRule2' is equivalent to this MatchRule
1028 virtual bool equivalent(FormDict& globals, MatchNode* mRule2);
1029
1030 void matchrule_swap_commutative_op(const char* instr_ident, int count, int& match_rules_cnt);
1031
1032 void dump();
1033 void output(FILE *fp);
1034 };
1035
|