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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 GlobalContext *Ctx; | 231 GlobalContext *Ctx; |
232 const bool RandomizeRegisterAllocation; | 232 const bool RandomizeRegisterAllocation; |
233 bool HasComputedFrame; | 233 bool HasComputedFrame; |
234 bool CallsReturnsTwice; | 234 bool CallsReturnsTwice; |
235 // StackAdjustment keeps track of the current stack offset from its | 235 // StackAdjustment keeps track of the current stack offset from its |
236 // natural location, as arguments are pushed for a function call. | 236 // natural location, as arguments are pushed for a function call. |
237 int32_t StackAdjustment; | 237 int32_t StackAdjustment; |
238 LoweringContext Context; | 238 LoweringContext Context; |
239 }; | 239 }; |
240 | 240 |
241 // TargetGlobalLowering is used for "lowering" global initializers, | 241 // TargetDataLowering is used for "lowering" data including initializers |
242 // including the internal constant pool. It is separated out from | 242 // for global variables, and the internal constant pools. It is separated |
243 // TargetLowering because it does not require a Cfg. | 243 // out from TargetLowering because it does not require a Cfg. |
244 class TargetGlobalLowering { | 244 class TargetDataLowering { |
245 TargetGlobalLowering() = delete; | 245 TargetDataLowering() = delete; |
246 TargetGlobalLowering(const TargetGlobalLowering &) = delete; | 246 TargetDataLowering(const TargetDataLowering &) = delete; |
247 TargetGlobalLowering &operator=(const TargetGlobalLowering &) = delete; | 247 TargetDataLowering &operator=(const TargetDataLowering &) = delete; |
248 | 248 |
249 public: | 249 public: |
250 static TargetGlobalLowering *createLowering(GlobalContext *Ctx); | 250 static TargetDataLowering *createLowering(GlobalContext *Ctx); |
251 virtual ~TargetGlobalLowering(); | 251 virtual ~TargetDataLowering(); |
252 | 252 |
253 virtual void lowerInit(const VariableDeclaration &Var) const = 0; | 253 virtual void lowerGlobal(const VariableDeclaration &Var) const = 0; |
| 254 virtual void lowerGlobalsELF(const VariableDeclarationList &Vars) const = 0; |
254 virtual void lowerConstants(GlobalContext *Ctx) const = 0; | 255 virtual void lowerConstants(GlobalContext *Ctx) const = 0; |
255 | 256 |
256 protected: | 257 protected: |
257 TargetGlobalLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 258 TargetDataLowering(GlobalContext *Ctx) : Ctx(Ctx) {} |
258 GlobalContext *Ctx; | 259 GlobalContext *Ctx; |
259 }; | 260 }; |
260 | 261 |
261 } // end of namespace Ice | 262 } // end of namespace Ice |
262 | 263 |
263 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 264 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
OLD | NEW |