| OLD | NEW | 
|---|
| 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// | 
| 2 // | 2 // | 
| 3 //                        The Subzero Code Generator | 3 //                        The Subzero Code Generator | 
| 4 // | 4 // | 
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source | 
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. | 
| 7 // | 7 // | 
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// | 
| 9 // | 9 // | 
| 10 // This file declares the TargetLowering and LoweringContext | 10 // This file declares the TargetLowering and LoweringContext | 
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 102   virtual void translateO0() { | 102   virtual void translateO0() { | 
| 103     Func->setError("Target doesn't specify O0 lowering steps."); | 103     Func->setError("Target doesn't specify O0 lowering steps."); | 
| 104   } | 104   } | 
| 105   virtual void translateO1() { | 105   virtual void translateO1() { | 
| 106     Func->setError("Target doesn't specify O1 lowering steps."); | 106     Func->setError("Target doesn't specify O1 lowering steps."); | 
| 107   } | 107   } | 
| 108   virtual void translateO2() { | 108   virtual void translateO2() { | 
| 109     Func->setError("Target doesn't specify O2 lowering steps."); | 109     Func->setError("Target doesn't specify O2 lowering steps."); | 
| 110   } | 110   } | 
| 111 | 111 | 
|  | 112   // Tries to do address mode optimization on a single instruction. | 
|  | 113   void doAddressOpt(); | 
| 112   // Lowers a single instruction. | 114   // Lowers a single instruction. | 
| 113   void lower(); | 115   void lower(); | 
| 114 | 116 | 
| 115   // Returns a variable pre-colored to the specified physical | 117   // Returns a variable pre-colored to the specified physical | 
| 116   // register.  This is generally used to get very direct access to | 118   // register.  This is generally used to get very direct access to | 
| 117   // the register such as in the prolog or epilog or for marking | 119   // the register such as in the prolog or epilog or for marking | 
| 118   // scratch registers as killed by a call. | 120   // scratch registers as killed by a call. | 
| 119   virtual Variable *getPhysicalRegister(SizeT RegNum) = 0; | 121   virtual Variable *getPhysicalRegister(SizeT RegNum) = 0; | 
| 120   // Returns a printable name for the register. | 122   // Returns a printable name for the register. | 
| 121   virtual IceString getRegName(SizeT RegNum, Type Ty) const = 0; | 123   virtual IceString getRegName(SizeT RegNum, Type Ty) const = 0; | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 166   virtual void lowerFcmp(const InstFcmp *Inst) = 0; | 168   virtual void lowerFcmp(const InstFcmp *Inst) = 0; | 
| 167   virtual void lowerIcmp(const InstIcmp *Inst) = 0; | 169   virtual void lowerIcmp(const InstIcmp *Inst) = 0; | 
| 168   virtual void lowerLoad(const InstLoad *Inst) = 0; | 170   virtual void lowerLoad(const InstLoad *Inst) = 0; | 
| 169   virtual void lowerPhi(const InstPhi *Inst) = 0; | 171   virtual void lowerPhi(const InstPhi *Inst) = 0; | 
| 170   virtual void lowerRet(const InstRet *Inst) = 0; | 172   virtual void lowerRet(const InstRet *Inst) = 0; | 
| 171   virtual void lowerSelect(const InstSelect *Inst) = 0; | 173   virtual void lowerSelect(const InstSelect *Inst) = 0; | 
| 172   virtual void lowerStore(const InstStore *Inst) = 0; | 174   virtual void lowerStore(const InstStore *Inst) = 0; | 
| 173   virtual void lowerSwitch(const InstSwitch *Inst) = 0; | 175   virtual void lowerSwitch(const InstSwitch *Inst) = 0; | 
| 174   virtual void lowerUnreachable(const InstUnreachable *Inst) = 0; | 176   virtual void lowerUnreachable(const InstUnreachable *Inst) = 0; | 
| 175 | 177 | 
|  | 178   virtual void doAddressOptLoad() {} | 
|  | 179   virtual void doAddressOptStore() {} | 
| 176   // This gives the target an opportunity to post-process the lowered | 180   // This gives the target an opportunity to post-process the lowered | 
| 177   // expansion before returning.  The primary intention is to do some | 181   // expansion before returning.  The primary intention is to do some | 
| 178   // Register Manager activity as necessary, specifically to eagerly | 182   // Register Manager activity as necessary, specifically to eagerly | 
| 179   // allocate registers based on affinity and other factors.  The | 183   // allocate registers based on affinity and other factors.  The | 
| 180   // simplest lowering does nothing here and leaves it all to a | 184   // simplest lowering does nothing here and leaves it all to a | 
| 181   // subsequent global register allocation pass. | 185   // subsequent global register allocation pass. | 
| 182   virtual void postLower() {} | 186   virtual void postLower() {} | 
| 183 | 187 | 
| 184   Cfg *Func; | 188   Cfg *Func; | 
| 185   GlobalContext *Ctx; | 189   GlobalContext *Ctx; | 
| 186   bool HasComputedFrame; | 190   bool HasComputedFrame; | 
| 187   // StackAdjustment keeps track of the current stack offset from its | 191   // StackAdjustment keeps track of the current stack offset from its | 
| 188   // natural location, as arguments are pushed for a function call. | 192   // natural location, as arguments are pushed for a function call. | 
| 189   int32_t StackAdjustment; | 193   int32_t StackAdjustment; | 
| 190   LoweringContext Context; | 194   LoweringContext Context; | 
| 191 | 195 | 
| 192 private: | 196 private: | 
| 193   TargetLowering(const TargetLowering &) LLVM_DELETED_FUNCTION; | 197   TargetLowering(const TargetLowering &) LLVM_DELETED_FUNCTION; | 
| 194   TargetLowering &operator=(const TargetLowering &) LLVM_DELETED_FUNCTION; | 198   TargetLowering &operator=(const TargetLowering &) LLVM_DELETED_FUNCTION; | 
| 195 }; | 199 }; | 
| 196 | 200 | 
| 197 } // end of namespace Ice | 201 } // end of namespace Ice | 
| 198 | 202 | 
| 199 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 203 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 
| OLD | NEW | 
|---|