Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: src/IceTargetLowering.h

Issue 733643005: Subzero: Use the linear-scan register allocator for Om1 as well. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Update/fix some comments Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 20 matching lines...) Expand all
229 virtual void lowerRet(const InstRet *Inst) = 0; 229 virtual void lowerRet(const InstRet *Inst) = 0;
230 virtual void lowerSelect(const InstSelect *Inst) = 0; 230 virtual void lowerSelect(const InstSelect *Inst) = 0;
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.
240 // Register Manager activity as necessary, specifically to eagerly
241 // allocate registers based on affinity and other factors. The
242 // simplest lowering does nothing here and leaves it all to a
243 // subsequent global register allocation pass.
244 virtual void postLower() {} 240 virtual void postLower() {}
245 241
246 Cfg *Func; 242 Cfg *Func;
247 GlobalContext *Ctx; 243 GlobalContext *Ctx;
248 bool HasComputedFrame; 244 bool HasComputedFrame;
249 bool CallsReturnsTwice; 245 bool CallsReturnsTwice;
250 // StackAdjustment keeps track of the current stack offset from its 246 // StackAdjustment keeps track of the current stack offset from its
251 // natural location, as arguments are pushed for a function call. 247 // natural location, as arguments are pushed for a function call.
252 int32_t StackAdjustment; 248 int32_t StackAdjustment;
253 LoweringContext Context; 249 LoweringContext Context;
(...skipping 15 matching lines...) Expand all
269 virtual void lower(const VariableDeclaration &Var) = 0; 265 virtual void lower(const VariableDeclaration &Var) = 0;
270 266
271 protected: 267 protected:
272 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 268 TargetGlobalInitLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
273 GlobalContext *Ctx; 269 GlobalContext *Ctx;
274 }; 270 };
275 271
276 } // end of namespace Ice 272 } // end of namespace Ice
277 273
278 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 274 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698