--- a/hotspot/src/share/vm/opto/machnode.hpp Thu Nov 07 11:47:11 2013 +0100
+++ b/hotspot/src/share/vm/opto/machnode.hpp Thu Nov 14 19:24:59 2013 -0800
@@ -155,7 +155,15 @@
virtual void ext_format(PhaseRegAlloc *,const MachNode *node,int idx, outputStream *st) const=0;
virtual void dump_spec(outputStream *st) const; // Print per-operand info
-#endif
+
+ // Check whether o is a valid oper.
+ static bool notAnOper(const MachOper *o) {
+ if (o == NULL) return true;
+ if (((intptr_t)o & 1) != 0) return true;
+ if (*(address*)o == badAddress) return true; // kill by Node::destruct
+ return false;
+ }
+#endif // !PRODUCT
};
//------------------------------MachNode---------------------------------------
@@ -220,6 +228,12 @@
// Emit bytes into cbuf
virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
+ // Expand node after register allocation.
+ // Node is replaced by several nodes in the postalloc expand phase.
+ // Corresponding methods are generated for nodes if they specify
+ // postalloc_expand. See block.cpp for more documentation.
+ virtual bool requires_postalloc_expand() const { return false; }
+ virtual void postalloc_expand(GrowableArray <Node *> *nodes, PhaseRegAlloc *ra_);
// Size of instruction in bytes
virtual uint size(PhaseRegAlloc *ra_) const;
// Helper function that computes size by emitting code
@@ -356,6 +370,9 @@
virtual uint ideal_reg() const { return Op_RegP; }
virtual uint oper_input_base() const { return 1; }
+ virtual bool requires_postalloc_expand() const;
+ virtual void postalloc_expand(GrowableArray <Node *> *nodes, PhaseRegAlloc *ra_);
+
virtual void emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const;
virtual uint size(PhaseRegAlloc* ra_) const;
virtual bool pinned() const { return UseRDPCForConstantTableBase; }