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

Side by Side Diff: src/IceTargetLowering.h

Issue 2172313002: Subzero : Live Range Splitting after initial Register Allocation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 4 years, 4 months 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
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 /// \file 10 /// \file
(...skipping 11 matching lines...) Expand all
22 22
23 #ifndef SUBZERO_SRC_ICETARGETLOWERING_H 23 #ifndef SUBZERO_SRC_ICETARGETLOWERING_H
24 #define SUBZERO_SRC_ICETARGETLOWERING_H 24 #define SUBZERO_SRC_ICETARGETLOWERING_H
25 25
26 #include "IceDefs.h" 26 #include "IceDefs.h"
27 #include "IceBitVector.h" 27 #include "IceBitVector.h"
28 #include "IceCfgNode.h" 28 #include "IceCfgNode.h"
29 #include "IceInst.h" // for the names of the Inst subtypes 29 #include "IceInst.h" // for the names of the Inst subtypes
30 #include "IceOperand.h" 30 #include "IceOperand.h"
31 #include "IceTypes.h" 31 #include "IceTypes.h"
32 #include "IceRegAlloc.h"
Jim Stichnoth 2016/07/29 17:04:07 sort
manasijm 2016/08/01 22:20:05 Done.
32 33
33 #include <utility> 34 #include <utility>
34 35
35 namespace Ice { 36 namespace Ice {
36 37
37 // UnimplementedError is defined as a macro so that we can get actual line 38 // UnimplementedError is defined as a macro so that we can get actual line
38 // numbers. 39 // numbers.
39 #define UnimplementedError(Flags) \ 40 #define UnimplementedError(Flags) \
40 do { \ 41 do { \
41 if (!static_cast<const ClFlags &>(Flags).getSkipUnimplemented()) { \ 42 if (!static_cast<const ClFlags &>(Flags).getSkipUnimplemented()) { \
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 virtual const SmallBitVector & 284 virtual const SmallBitVector &
284 getRegistersForVariable(const Variable *Var) const = 0; 285 getRegistersForVariable(const Variable *Var) const = 0;
285 /// Get the set of *all* physical registers available for the specified 286 /// Get the set of *all* physical registers available for the specified
286 /// Variable's register class, *not* applying register restrictions from the 287 /// Variable's register class, *not* applying register restrictions from the
287 /// command line. 288 /// command line.
288 virtual const SmallBitVector & 289 virtual const SmallBitVector &
289 getAllRegistersForVariable(const Variable *Var) const = 0; 290 getAllRegistersForVariable(const Variable *Var) const = 0;
290 virtual const SmallBitVector &getAliasesForRegister(RegNumT) const = 0; 291 virtual const SmallBitVector &getAliasesForRegister(RegNumT) const = 0;
291 292
292 void regAlloc(RegAllocKind Kind); 293 void regAlloc(RegAllocKind Kind);
294 void postRegallocSplitting(LinearScan &RegAllocator,
295 const SmallBitVector &RegMask);
293 296
294 virtual void 297 virtual void
295 makeRandomRegisterPermutation(llvm::SmallVectorImpl<RegNumT> &Permutation, 298 makeRandomRegisterPermutation(llvm::SmallVectorImpl<RegNumT> &Permutation,
296 const SmallBitVector &ExcludeRegisters, 299 const SmallBitVector &ExcludeRegisters,
297 uint64_t Salt) const = 0; 300 uint64_t Salt) const = 0;
298 301
299 /// Get the minimum number of clusters required for a jump table to be 302 /// Get the minimum number of clusters required for a jump table to be
300 /// considered. 303 /// considered.
301 virtual SizeT getMinJumpTableSize() const = 0; 304 virtual SizeT getMinJumpTableSize() const = 0;
302 virtual void emitJumpTable(const Cfg *Func, 305 virtual void emitJumpTable(const Cfg *Func,
(...skipping 11 matching lines...) Expand all
314 virtual void emit(const ConstantUndef *C) const = 0; 317 virtual void emit(const ConstantUndef *C) const = 0;
315 virtual void emit(const ConstantRelocatable *CR) const = 0; 318 virtual void emit(const ConstantRelocatable *CR) const = 0;
316 319
317 /// Performs target-specific argument lowering. 320 /// Performs target-specific argument lowering.
318 virtual void lowerArguments() = 0; 321 virtual void lowerArguments() = 0;
319 322
320 virtual void initNodeForLowering(CfgNode *) {} 323 virtual void initNodeForLowering(CfgNode *) {}
321 virtual void addProlog(CfgNode *Node) = 0; 324 virtual void addProlog(CfgNode *Node) = 0;
322 virtual void addEpilog(CfgNode *Node) = 0; 325 virtual void addEpilog(CfgNode *Node) = 0;
323 326
327 virtual Inst *createLoweredMove(Variable *Dest, Variable *SrcVar) {
328 (void)Dest;
329 (void)SrcVar;
330 llvm_unreachable("unimplemented createLoweredMove");
331 }
332
324 virtual ~TargetLowering() = default; 333 virtual ~TargetLowering() = default;
325 334
326 private: 335 private:
327 // This control variable is used by AutoBundle (RAII-style bundle 336 // This control variable is used by AutoBundle (RAII-style bundle
328 // locking/unlocking) to prevent nested bundles. 337 // locking/unlocking) to prevent nested bundles.
329 bool AutoBundling = false; 338 bool AutoBundling = false;
330 339
331 /// This indicates whether we are in the genTargetHelperCalls phase, and 340 /// This indicates whether we are in the genTargetHelperCalls phase, and
332 /// therefore can do things like scalarization. 341 /// therefore can do things like scalarization.
333 bool GeneratingTargetHelpers = false; 342 bool GeneratingTargetHelpers = false;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 virtual void lower() {} 630 virtual void lower() {}
622 631
623 protected: 632 protected:
624 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 633 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
625 GlobalContext *Ctx; 634 GlobalContext *Ctx;
626 }; 635 };
627 636
628 } // end of namespace Ice 637 } // end of namespace Ice
629 638
630 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 639 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698