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

Unified Diff: src/IceRegAlloc.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceDefs.h ('k') | src/IceRegAlloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceRegAlloc.h
diff --git a/src/IceRegAlloc.h b/src/IceRegAlloc.h
index f409e7a6c8b21ac798c60f1e559ed7181c5ce1e9..9b9992cdfcd443c507d0f424fd23e239a2d5145e 100644
--- a/src/IceRegAlloc.h
+++ b/src/IceRegAlloc.h
@@ -26,12 +26,16 @@ class LinearScan {
LinearScan &operator=(const LinearScan &) = delete;
public:
- LinearScan(Cfg *Func) : Func(Func) {}
- void initForGlobalAlloc();
+ LinearScan(Cfg *Func)
+ : Func(Func), FindPreference(false), FindOverlap(false) {}
+ void init(RegAllocKind Kind);
void scan(const llvm::SmallBitVector &RegMask);
void dump(Cfg *Func) const;
private:
+ void initForGlobal();
+ void initForInfOnly();
+
Cfg *const Func;
typedef std::vector<Variable *> OrderedRanges;
typedef std::list<Variable *> UnorderedRanges;
@@ -41,6 +45,12 @@ private:
OrderedRanges UnhandledPrecolored;
UnorderedRanges Active, Inactive, Handled;
std::vector<InstNumberT> Kills;
+ bool FindPreference;
+ bool FindOverlap;
+ // TODO(stichnot): We're not really using FindOverlap yet, but we
+ // may want a flavor of register allocation where FindPreference is
+ // useful but we didn't want to initialize VMetadata with VMK_All
+ // and therefore we can't safely allow overlap.
};
} // end of namespace Ice
« no previous file with comments | « src/IceDefs.h ('k') | src/IceRegAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698