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

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') | no next file with comments »
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..ee650c40cbd96937017f98b8c948e48823133a6a 100644
--- a/src/IceClFlags.h
+++ b/src/IceClFlags.h
@@ -28,6 +28,8 @@ class ClFlags {
ClFlags &operator=(const ClFlags &) = delete;
public:
+ using StringVector = std::vector<IceString>;
+
/// User defined constructor.
ClFlags() { resetClFlags(*this); }
@@ -115,6 +117,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 StringVector &getUseRestrictedRegisters() const {
+ return UseRestrictedRegisters;
+ }
+ void clearUseRestrictedRegisters() { UseRestrictedRegisters.clear(); }
+ void setUseRestrictedRegisters(const StringVector &Registers) {
+ UseRestrictedRegisters = Registers;
+ }
+
/// Get the value of ClFlags::ForceMemIntrinOpt
bool getForceMemIntrinOpt() const { return ForceMemIntrinOpt; }
/// Set ClFlags::ForceMemIntrinOpt to a new value
@@ -186,6 +198,13 @@ public:
/// Set ClFlags::UseNonsfi to a new value
void setUseNonsfi(bool NewValue) { UseNonsfi = NewValue; }
+ /// Get the list of registers exluded in register allocation.
+ const StringVector &getExcludedRegisters() const { return ExcludedRegisters; }
+ void clearExcludedRegisters() { ExcludedRegisters.clear(); }
+ void setExcludedRegisters(const StringVector &Registers) {
+ ExcludedRegisters = Registers;
+ }
+
/// 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;
+ StringVector ExcludedRegisters;
/// 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;
+ StringVector 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698