Mercurial > hg > truffle
comparison src/share/vm/adlc/formssel.hpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | abec000618bf |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14520:f84115370178 | 14521:29ccc4cbabca |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 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 | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
81 bool _is_cisc_alternate; | 81 bool _is_cisc_alternate; |
82 InstructForm *_cisc_spill_alternate;// cisc possible replacement | 82 InstructForm *_cisc_spill_alternate;// cisc possible replacement |
83 const char *_cisc_reg_mask_name; | 83 const char *_cisc_reg_mask_name; |
84 InstructForm *_short_branch_form; | 84 InstructForm *_short_branch_form; |
85 bool _is_short_branch; | 85 bool _is_short_branch; |
86 bool _is_mach_constant; // true if Node is a MachConstantNode | 86 bool _is_mach_constant; // True if Node is a MachConstantNode. |
87 bool _needs_constant_base; // True if Node needs the mach_constant_base input. | |
87 uint _alignment; | 88 uint _alignment; |
88 | 89 |
89 public: | 90 public: |
90 // Public Data | 91 // Public Data |
91 const char *_ident; // Name of this instruction | 92 const char *_ident; // Name of this instruction |
92 NameList _parameters; // Locally defined names | 93 NameList _parameters; // Locally defined names |
93 FormDict _localNames; // Table of operands & their types | 94 FormDict _localNames; // Table of operands & their types |
94 MatchRule *_matrule; // Matching rule for this instruction | 95 MatchRule *_matrule; // Matching rule for this instruction |
95 Opcode *_opcode; // Encoding of the opcode for instruction | 96 Opcode *_opcode; // Encoding of the opcode for instruction |
96 char *_size; // Size of instruction | 97 char *_size; // Size of instruction |
97 InsEncode *_insencode; // Encoding class instruction belongs to | 98 InsEncode *_insencode; // Encoding class instruction belongs to |
98 InsEncode *_constant; // Encoding class constant value belongs to | 99 InsEncode *_constant; // Encoding class constant value belongs to |
99 Attribute *_attribs; // List of Attribute rules | 100 bool _is_postalloc_expand; // Indicates that encoding just does a lateExpand. |
100 Predicate *_predicate; // Predicate test for this instruction | 101 Attribute *_attribs; // List of Attribute rules |
101 FormDict _effects; // Dictionary of effect rules | 102 Predicate *_predicate; // Predicate test for this instruction |
102 ExpandRule *_exprule; // Expand rule for this instruction | 103 FormDict _effects; // Dictionary of effect rules |
103 RewriteRule *_rewrule; // Rewrite rule for this instruction | 104 ExpandRule *_exprule; // Expand rule for this instruction |
104 FormatRule *_format; // Format for assembly generation | 105 RewriteRule *_rewrule; // Rewrite rule for this instruction |
105 Peephole *_peephole; // List of peephole rules for instruction | 106 FormatRule *_format; // Format for assembly generation |
106 const char *_ins_pipe; // Instruction Scheduling description class | 107 Peephole *_peephole; // List of peephole rules for instruction |
107 | 108 const char *_ins_pipe; // Instruction Scheduling description class |
108 uint *_uniq_idx; // Indexes of unique operands | 109 |
109 uint _uniq_idx_length; // Length of _uniq_idx array | 110 uint *_uniq_idx; // Indexes of unique operands |
110 uint _num_uniq; // Number of unique operands | 111 uint _uniq_idx_length; // Length of _uniq_idx array |
111 ComponentList _components; // List of Components matches MachNode's | 112 uint _num_uniq; // Number of unique operands |
112 // operand structure | 113 ComponentList _components; // List of Components matches MachNode's |
113 | 114 // operand structure |
114 bool _has_call; // contain a call and caller save registers should be saved? | 115 |
116 bool _has_call; // contain a call and caller save registers should be saved? | |
115 | 117 |
116 // Public Methods | 118 // Public Methods |
117 InstructForm(const char *id, bool ideal_only = false); | 119 InstructForm(const char *id, bool ideal_only = false); |
118 InstructForm(const char *id, InstructForm *instr, MatchRule *rule); | 120 InstructForm(const char *id, InstructForm *instr, MatchRule *rule); |
119 ~InstructForm(); | 121 ~InstructForm(); |
131 virtual bool has_temps(); | 133 virtual bool has_temps(); |
132 // This instruction defines or kills more than one object | 134 // This instruction defines or kills more than one object |
133 virtual uint num_defs_or_kills(); | 135 virtual uint num_defs_or_kills(); |
134 // This instruction has an expand rule? | 136 // This instruction has an expand rule? |
135 virtual bool expands() const ; | 137 virtual bool expands() const ; |
138 // This instruction has a late expand rule? | |
139 virtual bool postalloc_expands() const; | |
136 // Return this instruction's first peephole rule, or NULL | 140 // Return this instruction's first peephole rule, or NULL |
137 virtual Peephole *peepholes() const; | 141 virtual Peephole *peepholes() const; |
138 // Add a peephole rule to this instruction | 142 // Add a peephole rule to this instruction |
139 virtual void append_peephole(Peephole *peep); | 143 virtual void append_peephole(Peephole *peep); |
140 | 144 |
257 bool is_short_branch() { return _is_short_branch; } | 261 bool is_short_branch() { return _is_short_branch; } |
258 void set_short_branch(bool val) { _is_short_branch = val; } | 262 void set_short_branch(bool val) { _is_short_branch = val; } |
259 | 263 |
260 bool is_mach_constant() const { return _is_mach_constant; } | 264 bool is_mach_constant() const { return _is_mach_constant; } |
261 void set_is_mach_constant(bool x) { _is_mach_constant = x; } | 265 void set_is_mach_constant(bool x) { _is_mach_constant = x; } |
266 bool needs_constant_base() const { return _needs_constant_base; } | |
267 void set_needs_constant_base(bool x) { _needs_constant_base = x; } | |
262 | 268 |
263 InstructForm *short_branch_form() { return _short_branch_form; } | 269 InstructForm *short_branch_form() { return _short_branch_form; } |
264 bool has_short_branch_form() { return _short_branch_form != NULL; } | 270 bool has_short_branch_form() { return _short_branch_form != NULL; } |
265 // Output short branch prototypes and method bodies | 271 // Output short branch prototypes and method bodies |
266 void declare_short_branch_methods(FILE *fp_cpp); | 272 void declare_short_branch_methods(FILE *fp_cpp); |