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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 virtual IceString getRegName(SizeT RegNum, Type Ty) const = 0; | 157 virtual IceString getRegName(SizeT RegNum, Type Ty) const = 0; |
158 | 158 |
159 virtual bool hasFramePointer() const { return false; } | 159 virtual bool hasFramePointer() const { return false; } |
160 virtual SizeT getFrameOrStackReg() const = 0; | 160 virtual SizeT getFrameOrStackReg() const = 0; |
161 virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0; | 161 virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0; |
162 bool hasComputedFrame() const { return HasComputedFrame; } | 162 bool hasComputedFrame() const { return HasComputedFrame; } |
163 bool shouldDoNopInsertion() const; | 163 bool shouldDoNopInsertion() const; |
164 // Returns true if this function calls a function that has the | 164 // Returns true if this function calls a function that has the |
165 // "returns twice" attribute. | 165 // "returns twice" attribute. |
166 bool callsReturnsTwice() const { return CallsReturnsTwice; } | 166 bool callsReturnsTwice() const { return CallsReturnsTwice; } |
167 void setCallsReturnsTwice(bool RetTwice) { | 167 void setCallsReturnsTwice(bool RetTwice) { CallsReturnsTwice = RetTwice; } |
168 CallsReturnsTwice = RetTwice; | |
169 } | |
170 int32_t getStackAdjustment() const { return StackAdjustment; } | 168 int32_t getStackAdjustment() const { return StackAdjustment; } |
171 void updateStackAdjustment(int32_t Offset) { StackAdjustment += Offset; } | 169 void updateStackAdjustment(int32_t Offset) { StackAdjustment += Offset; } |
172 void resetStackAdjustment() { StackAdjustment = 0; } | 170 void resetStackAdjustment() { StackAdjustment = 0; } |
173 LoweringContext &getContext() { return Context; } | 171 LoweringContext &getContext() { return Context; } |
174 | 172 |
175 enum RegSet { | 173 enum RegSet { |
176 RegSet_None = 0, | 174 RegSet_None = 0, |
177 RegSet_CallerSave = 1 << 0, | 175 RegSet_CallerSave = 1 << 0, |
178 RegSet_CalleeSave = 1 << 1, | 176 RegSet_CalleeSave = 1 << 1, |
179 RegSet_StackPointer = 1 << 2, | 177 RegSet_StackPointer = 1 << 2, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 virtual void lowerConstants(GlobalContext *Ctx) const = 0; | 254 virtual void lowerConstants(GlobalContext *Ctx) const = 0; |
257 | 255 |
258 protected: | 256 protected: |
259 TargetGlobalLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 257 TargetGlobalLowering(GlobalContext *Ctx) : Ctx(Ctx) {} |
260 GlobalContext *Ctx; | 258 GlobalContext *Ctx; |
261 }; | 259 }; |
262 | 260 |
263 } // end of namespace Ice | 261 } // end of namespace Ice |
264 | 262 |
265 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 263 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
OLD | NEW |