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 // FORMSOPT.HPP - ADL Parser Target Specific Optimization Forms Classes
26
27 // Class List
28 class Form;
29 class InstructForm;
30 class OperandForm;
31 class OpClassForm;
32 class AttributeForm;
33 class RegisterForm;
34 class PipelineForm;
35 class SourceForm;
36 class EncodeForm;
37 class Component;
38 class Constraint;
39 class Predicate;
40 class MatchRule;
41 class Attribute;
42 class Effect;
43 class ExpandRule;
44 class RewriteRule;
529
530 class PeepChild : public Form {
531 public:
532 const int _inst_num; // Number of instruction (-1 if only named)
533 const char *_inst_op; // Instruction's operand, NULL if number == -1
534 const char *_inst_name; // Name of the instruction
535
536 public:
537 PeepChild(char *inst_name)
538 : _inst_num(-1), _inst_op(NULL), _inst_name(inst_name) {};
539 PeepChild(int inst_num, char *inst_op, char *inst_name)
540 : _inst_num(inst_num), _inst_op(inst_op), _inst_name(inst_name) {};
541 ~PeepChild();
542
543 bool use_leaf_operand() { return _inst_num != -1; };
544 bool generate_an_instruction() { return _inst_num == -1; }
545
546 void dump();
547 void output(FILE *fp);
548 };
|
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 #ifndef SHARE_VM_ADLC_FORMSOPT_HPP
26 #define SHARE_VM_ADLC_FORMSOPT_HPP
27
28 // FORMSOPT.HPP - ADL Parser Target Specific Optimization Forms Classes
29
30 // Class List
31 class Form;
32 class InstructForm;
33 class OperandForm;
34 class OpClassForm;
35 class AttributeForm;
36 class RegisterForm;
37 class PipelineForm;
38 class SourceForm;
39 class EncodeForm;
40 class Component;
41 class Constraint;
42 class Predicate;
43 class MatchRule;
44 class Attribute;
45 class Effect;
46 class ExpandRule;
47 class RewriteRule;
532
533 class PeepChild : public Form {
534 public:
535 const int _inst_num; // Number of instruction (-1 if only named)
536 const char *_inst_op; // Instruction's operand, NULL if number == -1
537 const char *_inst_name; // Name of the instruction
538
539 public:
540 PeepChild(char *inst_name)
541 : _inst_num(-1), _inst_op(NULL), _inst_name(inst_name) {};
542 PeepChild(int inst_num, char *inst_op, char *inst_name)
543 : _inst_num(inst_num), _inst_op(inst_op), _inst_name(inst_name) {};
544 ~PeepChild();
545
546 bool use_leaf_operand() { return _inst_num != -1; };
547 bool generate_an_instruction() { return _inst_num == -1; }
548
549 void dump();
550 void output(FILE *fp);
551 };
552
553 #endif // SHARE_VM_ADLC_FORMSOPT_HPP
|