< prev index next >

src/hotspot/share/opto/machnode.hpp

Print this page
rev 48394 : [RFC] MachSpillCopy peephole
Enable OptoPeephole by default on AArch64.
Add manually defined peephole() method for MachSpillCopy node.

@@ -558,24 +558,27 @@
                                        // the phi and its input resides at different locations (i.e. reg or mem)
     BasePointerToMem,                  // Spill base pointer to memory at safepoint
     InputToRematerialization,          // When rematerializing a node we stretch the inputs live ranges, and they might be
                                        // stretched beyond a new definition point, therefore we split out new copies instead
     CallUse,                           // Spill use at a call
-    Bound                              // An lrg marked as spill that is bound and needs to be spilled at a use
+    Bound,                             // An lrg marked as spill that is bound and needs to be spilled at a use
+    Pair                               // Spill two in a pair
   };
 private:
   const RegMask *_in;           // RegMask for input
   const RegMask *_out;          // RegMask for output
   const Type *_type;
-  const SpillType _spill_type;
+  SpillType _spill_type;
+  OptoReg::Name pair_hi_reg;    // Ugly prototype
 public:
   MachSpillCopyNode(SpillType spill_type, Node *n, const RegMask &in, const RegMask &out ) :
     MachIdealNode(), _spill_type(spill_type), _in(&in), _out(&out), _type(n->bottom_type()) {
     init_class_id(Class_MachSpillCopy);
     init_flags(Flag_is_Copy);
     add_req(NULL);
     add_req(n);
+    pair_hi_reg = OptoReg::Bad;
   }
   virtual uint size_of() const { return sizeof(*this); }
   void set_out_RegMask(const RegMask &out) { _out = &out; }
   void set_in_RegMask(const RegMask &in) { _in = &in; }
   virtual const RegMask &out_RegMask() const { return *_out; }

@@ -585,11 +588,13 @@
   virtual uint oper_input_base() const { return 1; }
   uint implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bool do_size, outputStream* st ) const;
 
   virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;
   virtual uint size(PhaseRegAlloc *ra_) const;
-
+#ifdef AARCH64
+  virtual MachNode *peephole(Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted);
+#endif
 
 #ifndef PRODUCT
   static const char *spill_type(SpillType st) {
     switch (st) {
       case TwoAddress:

@@ -616,10 +621,12 @@
         return "InputToRematerializationSpillCopy";
       case CallUse:
         return "CallUseSpillCopy";
       case Bound:
         return "BoundSpillCopy";
+      case Pair:
+        return "Pair";
       default:
         assert(false, "Must have valid spill type");
         return "MachSpillCopy";
     }
   }
< prev index next >