src/share/vm/opto/machnode.hpp

Print this page
rev 5661 : 8003854: PPC64 (part 115): Introduce lateExpand that expands nodes after register allocation.

@@ -153,11 +153,19 @@
   // Methods to output the text version of the operand
   virtual void int_format(PhaseRegAlloc *,const MachNode *node, outputStream *st) const = 0;
   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---------------------------------------
 // Base type for all machine specific nodes.  All node classes generated by the
 // ADLC inherit from this class.

@@ -291,10 +299,15 @@
 
   // Get the pipeline info
   static const Pipeline *pipeline_class();
   virtual const Pipeline *pipeline() const;
 
+  // Node is replaced by several nodes in late expand phase.
+  // Corresponding methods are generated for nodes if they specify
+  // lateExpand. See block.cpp for more documentation.
+  virtual bool requires_late_expand() const { return false; }
+
 #ifndef PRODUCT
   virtual const char *Name() const = 0; // Machine-specific name
   virtual void dump_spec(outputStream *st) const; // Print per-node info
   void         dump_format(PhaseRegAlloc *ra, outputStream *st) const; // access to virtual
 #endif

@@ -354,10 +367,13 @@
   }
   virtual const class Type* bottom_type() const { return TypeRawPtr::NOTNULL; }
   virtual uint ideal_reg() const { return Op_RegP; }
   virtual uint oper_input_base() const { return 1; }
 
+  virtual bool requires_late_expand() const;
+  virtual void lateExpand(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; }
 
   static const RegMask& static_out_RegMask() { return _out_RegMask; }