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

Unified Diff: src/IceClFlags.h

Issue 1571433004: Implements include/exclude register lists for translation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceCfg.h ('k') | src/IceClFlags.cpp » ('j') | src/IceClFlags.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceClFlags.h
diff --git a/src/IceClFlags.h b/src/IceClFlags.h
index d89186c886e3502746686a6ddad6707664b4ed44..c693f96d465df107294593557fb742ffbe64277d 100644
--- a/src/IceClFlags.h
+++ b/src/IceClFlags.h
@@ -115,6 +115,16 @@ public:
/// Set ClFlags::EnableBlockProfile to a new value
void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; }
+ /// Get the restricted list of registers to use, for corresponding register
+ /// classes, in register allocation.
+ const std::unordered_set<std::string> &getUseRestrictedRegisters() const {
+ return UseRestrictedRegisters;
+ }
+ void clearUseRestrictedRegisters() { UseRestrictedRegisters.clear(); }
+ void insertUseRestrictedRegister(const std::string &Str) {
+ UseRestrictedRegisters.insert(Str);
+ }
+
/// Get the value of ClFlags::ForceMemIntrinOpt
bool getForceMemIntrinOpt() const { return ForceMemIntrinOpt; }
/// Set ClFlags::ForceMemIntrinOpt to a new value
@@ -186,6 +196,15 @@ public:
/// Set ClFlags::UseNonsfi to a new value
void setUseNonsfi(bool NewValue) { UseNonsfi = NewValue; }
+ /// Get the list of registers exluded in register allocation.
+ const std::unordered_set<std::string> &getExcludedRegisters() const {
+ return ExcludedRegisters;
+ }
+ void clearExcludedRegisters() { ExcludedRegisters.clear(); }
+ void insertExcludedRegister(const std::string &Str) {
+ ExcludedRegisters.insert(Str);
+ }
+
/// Get the value of ClFlags::UseSandboxing
bool getUseSandboxing() const { return UseSandboxing; }
/// Set ClFlags::UseSandboxing to a new value
@@ -390,6 +409,8 @@ private:
bool DumpStats;
/// see anonymous_namespace{IceClFlags.cpp}::EnableBlockProfile
bool EnableBlockProfile;
+ /// see anonymous_namespace{IceClFlags.cpp}::ExcludedRegisters;
+ std::unordered_set<std::string> ExcludedRegisters;
Jim Stichnoth 2016/01/13 16:24:54 I'd prefer IceString instead of std::string.
Karl 2016/01/14 18:27:19 Done.
/// see anonymous_namespace{IceClFlags.cpp}::ForceMemIntrinOpt
bool ForceMemIntrinOpt;
/// see anonymous_namespace{IceClFlags.cpp}::FunctionSections
@@ -422,6 +443,8 @@ private:
bool TimeEachFunction;
/// see anonymous_namespace{IceClFlags.cpp}::UseNonsfi
bool UseNonsfi;
+ /// see anonymous_namespace{IceClFlags.cpp}::UseRegistrictedRegisters;
+ std::unordered_set<std::string> UseRestrictedRegisters;
/// see anonymous_namespace{IceClFlags.cpp}::UseSandboxing
bool UseSandboxing;
/// see anonymous_namespace{IceClFlags.cpp}::OLevel
« no previous file with comments | « src/IceCfg.h ('k') | src/IceClFlags.cpp » ('j') | src/IceClFlags.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698