Mercurial > hg > graal-compiler
comparison src/share/vm/opto/machnode.hpp @ 14428:044b28168e20
8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
Summary: added ability in C2 to expand mach nodes to several mach nodes after register allocation
Reviewed-by: kvn
author | goetz |
---|---|
date | Thu, 14 Nov 2013 19:24:59 -0800 |
parents | 9758d9f36299 |
children | 1410ad6b05f1 |
comparison
equal
deleted
inserted
replaced
14427:eb178e97560c | 14428:044b28168e20 |
---|---|
153 // Methods to output the text version of the operand | 153 // Methods to output the text version of the operand |
154 virtual void int_format(PhaseRegAlloc *,const MachNode *node, outputStream *st) const = 0; | 154 virtual void int_format(PhaseRegAlloc *,const MachNode *node, outputStream *st) const = 0; |
155 virtual void ext_format(PhaseRegAlloc *,const MachNode *node,int idx, outputStream *st) const=0; | 155 virtual void ext_format(PhaseRegAlloc *,const MachNode *node,int idx, outputStream *st) const=0; |
156 | 156 |
157 virtual void dump_spec(outputStream *st) const; // Print per-operand info | 157 virtual void dump_spec(outputStream *st) const; // Print per-operand info |
158 #endif | 158 |
159 // Check whether o is a valid oper. | |
160 static bool notAnOper(const MachOper *o) { | |
161 if (o == NULL) return true; | |
162 if (((intptr_t)o & 1) != 0) return true; | |
163 if (*(address*)o == badAddress) return true; // kill by Node::destruct | |
164 return false; | |
165 } | |
166 #endif // !PRODUCT | |
159 }; | 167 }; |
160 | 168 |
161 //------------------------------MachNode--------------------------------------- | 169 //------------------------------MachNode--------------------------------------- |
162 // Base type for all machine specific nodes. All node classes generated by the | 170 // Base type for all machine specific nodes. All node classes generated by the |
163 // ADLC inherit from this class. | 171 // ADLC inherit from this class. |
218 MachOper **_opnds; | 226 MachOper **_opnds; |
219 uint num_opnds() const { return _num_opnds; } | 227 uint num_opnds() const { return _num_opnds; } |
220 | 228 |
221 // Emit bytes into cbuf | 229 // Emit bytes into cbuf |
222 virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; | 230 virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; |
231 // Expand node after register allocation. | |
232 // Node is replaced by several nodes in the postalloc expand phase. | |
233 // Corresponding methods are generated for nodes if they specify | |
234 // postalloc_expand. See block.cpp for more documentation. | |
235 virtual bool requires_postalloc_expand() const { return false; } | |
236 virtual void postalloc_expand(GrowableArray <Node *> *nodes, PhaseRegAlloc *ra_); | |
223 // Size of instruction in bytes | 237 // Size of instruction in bytes |
224 virtual uint size(PhaseRegAlloc *ra_) const; | 238 virtual uint size(PhaseRegAlloc *ra_) const; |
225 // Helper function that computes size by emitting code | 239 // Helper function that computes size by emitting code |
226 virtual uint emit_size(PhaseRegAlloc *ra_) const; | 240 virtual uint emit_size(PhaseRegAlloc *ra_) const; |
227 | 241 |
353 init_class_id(Class_MachConstantBase); | 367 init_class_id(Class_MachConstantBase); |
354 } | 368 } |
355 virtual const class Type* bottom_type() const { return TypeRawPtr::NOTNULL; } | 369 virtual const class Type* bottom_type() const { return TypeRawPtr::NOTNULL; } |
356 virtual uint ideal_reg() const { return Op_RegP; } | 370 virtual uint ideal_reg() const { return Op_RegP; } |
357 virtual uint oper_input_base() const { return 1; } | 371 virtual uint oper_input_base() const { return 1; } |
372 | |
373 virtual bool requires_postalloc_expand() const; | |
374 virtual void postalloc_expand(GrowableArray <Node *> *nodes, PhaseRegAlloc *ra_); | |
358 | 375 |
359 virtual void emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const; | 376 virtual void emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const; |
360 virtual uint size(PhaseRegAlloc* ra_) const; | 377 virtual uint size(PhaseRegAlloc* ra_) const; |
361 virtual bool pinned() const { return UseRDPCForConstantTableBase; } | 378 virtual bool pinned() const { return UseRDPCForConstantTableBase; } |
362 | 379 |