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 /// \file | 10 /// \file |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 /// Returns a variable pre-colored to the specified physical register. This is | 179 /// Returns a variable pre-colored to the specified physical register. This is |
180 /// generally used to get very direct access to the register such as in the | 180 /// generally used to get very direct access to the register such as in the |
181 /// prolog or epilog or for marking scratch registers as killed by a call. If | 181 /// prolog or epilog or for marking scratch registers as killed by a call. If |
182 /// a Type is not provided, a target-specific default type is used. | 182 /// a Type is not provided, a target-specific default type is used. |
183 virtual Variable *getPhysicalRegister(SizeT RegNum, | 183 virtual Variable *getPhysicalRegister(SizeT RegNum, |
184 Type Ty = IceType_void) = 0; | 184 Type Ty = IceType_void) = 0; |
185 /// Returns a printable name for the register. | 185 /// Returns a printable name for the register. |
186 virtual IceString getRegName(SizeT RegNum, Type Ty) const = 0; | 186 virtual IceString getRegName(SizeT RegNum, Type Ty) const = 0; |
187 | 187 |
188 virtual bool hasFramePointer() const { return false; } | 188 virtual bool hasFramePointer() const { return false; } |
| 189 virtual SizeT getStackReg() const = 0; |
189 virtual SizeT getFrameOrStackReg() const = 0; | 190 virtual SizeT getFrameOrStackReg() const = 0; |
190 virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0; | 191 virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0; |
191 | 192 |
192 /// Return whether a 64-bit Variable should be split into a Variable64On32. | 193 /// Return whether a 64-bit Variable should be split into a Variable64On32. |
193 virtual bool shouldSplitToVariable64On32(Type Ty) const = 0; | 194 virtual bool shouldSplitToVariable64On32(Type Ty) const = 0; |
194 | 195 |
195 bool hasComputedFrame() const { return HasComputedFrame; } | 196 bool hasComputedFrame() const { return HasComputedFrame; } |
196 /// Returns true if this function calls a function that has the "returns | 197 /// Returns true if this function calls a function that has the "returns |
197 /// twice" attribute. | 198 /// twice" attribute. |
198 bool callsReturnsTwice() const { return CallsReturnsTwice; } | 199 bool callsReturnsTwice() const { return CallsReturnsTwice; } |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 virtual void lower() {} | 462 virtual void lower() {} |
462 | 463 |
463 protected: | 464 protected: |
464 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 465 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} |
465 GlobalContext *Ctx; | 466 GlobalContext *Ctx; |
466 }; | 467 }; |
467 | 468 |
468 } // end of namespace Ice | 469 } // end of namespace Ice |
469 | 470 |
470 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 471 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
OLD | NEW |