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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 RegSet_CalleeSave = 1 << 1, | 188 RegSet_CalleeSave = 1 << 1, |
189 RegSet_StackPointer = 1 << 2, | 189 RegSet_StackPointer = 1 << 2, |
190 RegSet_FramePointer = 1 << 3, | 190 RegSet_FramePointer = 1 << 3, |
191 RegSet_All = ~RegSet_None | 191 RegSet_All = ~RegSet_None |
192 }; | 192 }; |
193 typedef uint32_t RegSetMask; | 193 typedef uint32_t RegSetMask; |
194 | 194 |
195 virtual llvm::SmallBitVector getRegisterSet(RegSetMask Include, | 195 virtual llvm::SmallBitVector getRegisterSet(RegSetMask Include, |
196 RegSetMask Exclude) const = 0; | 196 RegSetMask Exclude) const = 0; |
197 virtual const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const = 0; | 197 virtual const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const = 0; |
198 void regAlloc(); | 198 void regAlloc(RegAllocKind Kind); |
199 | 199 |
200 virtual void emitVariable(const Variable *Var) const = 0; | 200 virtual void emitVariable(const Variable *Var) const = 0; |
201 | 201 |
202 // Performs target-specific argument lowering. | 202 // Performs target-specific argument lowering. |
203 virtual void lowerArguments() = 0; | 203 virtual void lowerArguments() = 0; |
204 | 204 |
205 virtual void addProlog(CfgNode *Node) = 0; | 205 virtual void addProlog(CfgNode *Node) = 0; |
206 virtual void addEpilog(CfgNode *Node) = 0; | 206 virtual void addEpilog(CfgNode *Node) = 0; |
207 | 207 |
208 virtual void emitConstants() const = 0; | 208 virtual void emitConstants() const = 0; |
(...skipping 22 matching lines...) Expand all Loading... | |
231 virtual void lowerStore(const InstStore *Inst) = 0; | 231 virtual void lowerStore(const InstStore *Inst) = 0; |
232 virtual void lowerSwitch(const InstSwitch *Inst) = 0; | 232 virtual void lowerSwitch(const InstSwitch *Inst) = 0; |
233 virtual void lowerUnreachable(const InstUnreachable *Inst) = 0; | 233 virtual void lowerUnreachable(const InstUnreachable *Inst) = 0; |
234 | 234 |
235 virtual void doAddressOptLoad() {} | 235 virtual void doAddressOptLoad() {} |
236 virtual void doAddressOptStore() {} | 236 virtual void doAddressOptStore() {} |
237 virtual void randomlyInsertNop(float Probability) = 0; | 237 virtual void randomlyInsertNop(float Probability) = 0; |
238 // This gives the target an opportunity to post-process the lowered | 238 // This gives the target an opportunity to post-process the lowered |
239 // expansion before returning. The primary intention is to do some | 239 // expansion before returning. The primary intention is to do some |
240 // Register Manager activity as necessary, specifically to eagerly | 240 // Register Manager activity as necessary, specifically to eagerly |
241 // allocate registers based on affinity and other factors. The | 241 // allocate registers based on affinity and other factors. The |
jvoung (off chromium)
2014/11/14 23:26:22
Update the postLower comment?
Jim Stichnoth
2014/11/14 23:51:34
Ewww. That comment I think was a relic of the ear
| |
242 // simplest lowering does nothing here and leaves it all to a | 242 // simplest lowering does nothing here and leaves it all to a |
243 // subsequent global register allocation pass. | 243 // subsequent global register allocation pass. |
244 virtual void postLower() {} | 244 virtual void postLower() {} |
245 | 245 |
246 Cfg *Func; | 246 Cfg *Func; |
247 GlobalContext *Ctx; | 247 GlobalContext *Ctx; |
248 bool HasComputedFrame; | 248 bool HasComputedFrame; |
249 bool CallsReturnsTwice; | 249 bool CallsReturnsTwice; |
250 // StackAdjustment keeps track of the current stack offset from its | 250 // StackAdjustment keeps track of the current stack offset from its |
251 // natural location, as arguments are pushed for a function call. | 251 // natural location, as arguments are pushed for a function call. |
(...skipping 17 matching lines...) Expand all Loading... | |
269 virtual void lower(const VariableDeclaration &Var) = 0; | 269 virtual void lower(const VariableDeclaration &Var) = 0; |
270 | 270 |
271 protected: | 271 protected: |
272 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 272 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {} |
273 GlobalContext *Ctx; | 273 GlobalContext *Ctx; |
274 }; | 274 }; |
275 | 275 |
276 } // end of namespace Ice | 276 } // end of namespace Ice |
277 | 277 |
278 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 278 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
OLD | NEW |