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

Side by Side Diff: src/IceRegAlloc.h

Issue 952953002: Subzero: Improve class definition hygiene. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix typo Created 5 years, 10 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
« no previous file with comments | « src/IceRNG.h ('k') | src/IceRegAlloc.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/IceRegAlloc.h - Linear-scan reg. allocation --*- C++ -*-===// 1 //===- subzero/src/IceRegAlloc.h - Linear-scan reg. allocation --*- 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 LinearScan data structure used during 10 // This file declares the LinearScan data structure used during
11 // linear-scan register allocation, which holds the various work 11 // linear-scan register allocation, which holds the various work
12 // queues for the linear-scan algorithm. 12 // queues for the linear-scan algorithm.
13 // 13 //
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #ifndef SUBZERO_SRC_ICEREGALLOC_H 16 #ifndef SUBZERO_SRC_ICEREGALLOC_H
17 #define SUBZERO_SRC_ICEREGALLOC_H 17 #define SUBZERO_SRC_ICEREGALLOC_H
18 18
19 #include "IceDefs.h" 19 #include "IceDefs.h"
20 #include "IceTypes.h" 20 #include "IceTypes.h"
21 21
22 namespace Ice { 22 namespace Ice {
23 23
24 class LinearScan { 24 class LinearScan {
25 LinearScan() = delete;
25 LinearScan(const LinearScan &) = delete; 26 LinearScan(const LinearScan &) = delete;
26 LinearScan &operator=(const LinearScan &) = delete; 27 LinearScan &operator=(const LinearScan &) = delete;
27 28
28 public: 29 public:
29 LinearScan(Cfg *Func) 30 explicit LinearScan(Cfg *Func)
30 : Func(Func), FindPreference(false), FindOverlap(false) {} 31 : Func(Func), FindPreference(false), FindOverlap(false) {}
31 void init(RegAllocKind Kind); 32 void init(RegAllocKind Kind);
32 void scan(const llvm::SmallBitVector &RegMask, bool Randomized); 33 void scan(const llvm::SmallBitVector &RegMask, bool Randomized);
33 void dump(Cfg *Func) const; 34 void dump(Cfg *Func) const;
34 35
35 private: 36 private:
36 typedef std::vector<Variable *> OrderedRanges; 37 typedef std::vector<Variable *> OrderedRanges;
37 typedef std::vector<Variable *> UnorderedRanges; 38 typedef std::vector<Variable *> UnorderedRanges;
38 39
39 void initForGlobal(); 40 void initForGlobal();
(...skipping 21 matching lines...) Expand all
61 bool FindOverlap; 62 bool FindOverlap;
62 // TODO(stichnot): We're not really using FindOverlap yet, but we 63 // TODO(stichnot): We're not really using FindOverlap yet, but we
63 // may want a flavor of register allocation where FindPreference is 64 // may want a flavor of register allocation where FindPreference is
64 // useful but we didn't want to initialize VMetadata with VMK_All 65 // useful but we didn't want to initialize VMetadata with VMK_All
65 // and therefore we can't safely allow overlap. 66 // and therefore we can't safely allow overlap.
66 }; 67 };
67 68
68 } // end of namespace Ice 69 } // end of namespace Ice
69 70
70 #endif // SUBZERO_SRC_ICEREGALLOC_H 71 #endif // SUBZERO_SRC_ICEREGALLOC_H
OLDNEW
« no previous file with comments | « src/IceRNG.h ('k') | src/IceRegAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698