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

Side by Side 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 unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceClFlags.h - Cl Flags for translation ------*- C++ -*-===// 1 //===- subzero/src/IceClFlags.h - Cl Flags for translation ------*- 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 /// Get the value of ClFlags::DumpStats 108 /// Get the value of ClFlags::DumpStats
109 bool getDumpStats() const { return BuildDefs::dump() && DumpStats; } 109 bool getDumpStats() const { return BuildDefs::dump() && DumpStats; }
110 /// Set ClFlags::DumpStats to a new value 110 /// Set ClFlags::DumpStats to a new value
111 void setDumpStats(bool NewValue) { DumpStats = NewValue; } 111 void setDumpStats(bool NewValue) { DumpStats = NewValue; }
112 112
113 /// Get the value of ClFlags::EnableBlockProfile 113 /// Get the value of ClFlags::EnableBlockProfile
114 bool getEnableBlockProfile() const { return EnableBlockProfile; } 114 bool getEnableBlockProfile() const { return EnableBlockProfile; }
115 /// Set ClFlags::EnableBlockProfile to a new value 115 /// Set ClFlags::EnableBlockProfile to a new value
116 void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; } 116 void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; }
117 117
118 /// Get the restricted list of registers to use, for corresponding register
119 /// classes, in register allocation.
120 const std::unordered_set<std::string> &getUseRestrictedRegisters() const {
121 return UseRestrictedRegisters;
122 }
123 void clearUseRestrictedRegisters() { UseRestrictedRegisters.clear(); }
124 void insertUseRestrictedRegister(const std::string &Str) {
125 UseRestrictedRegisters.insert(Str);
126 }
127
118 /// Get the value of ClFlags::ForceMemIntrinOpt 128 /// Get the value of ClFlags::ForceMemIntrinOpt
119 bool getForceMemIntrinOpt() const { return ForceMemIntrinOpt; } 129 bool getForceMemIntrinOpt() const { return ForceMemIntrinOpt; }
120 /// Set ClFlags::ForceMemIntrinOpt to a new value 130 /// Set ClFlags::ForceMemIntrinOpt to a new value
121 void setForceMemIntrinOpt(bool NewValue) { ForceMemIntrinOpt = NewValue; } 131 void setForceMemIntrinOpt(bool NewValue) { ForceMemIntrinOpt = NewValue; }
122 132
123 /// Get the value of ClFlags::FunctionSections 133 /// Get the value of ClFlags::FunctionSections
124 bool getFunctionSections() const { return FunctionSections; } 134 bool getFunctionSections() const { return FunctionSections; }
125 /// Set ClFlags::FunctionSections to a new value 135 /// Set ClFlags::FunctionSections to a new value
126 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; } 136 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; }
127 137
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return BuildDefs::dump() && TimeEachFunction; 189 return BuildDefs::dump() && TimeEachFunction;
180 } 190 }
181 /// Set ClFlags::TimeEachFunction to a new value 191 /// Set ClFlags::TimeEachFunction to a new value
182 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; } 192 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; }
183 193
184 /// Get the value of ClFlags::UseNonsfi 194 /// Get the value of ClFlags::UseNonsfi
185 bool getUseNonsfi() const { return UseNonsfi; } 195 bool getUseNonsfi() const { return UseNonsfi; }
186 /// Set ClFlags::UseNonsfi to a new value 196 /// Set ClFlags::UseNonsfi to a new value
187 void setUseNonsfi(bool NewValue) { UseNonsfi = NewValue; } 197 void setUseNonsfi(bool NewValue) { UseNonsfi = NewValue; }
188 198
199 /// Get the list of registers exluded in register allocation.
200 const std::unordered_set<std::string> &getExcludedRegisters() const {
201 return ExcludedRegisters;
202 }
203 void clearExcludedRegisters() { ExcludedRegisters.clear(); }
204 void insertExcludedRegister(const std::string &Str) {
205 ExcludedRegisters.insert(Str);
206 }
207
189 /// Get the value of ClFlags::UseSandboxing 208 /// Get the value of ClFlags::UseSandboxing
190 bool getUseSandboxing() const { return UseSandboxing; } 209 bool getUseSandboxing() const { return UseSandboxing; }
191 /// Set ClFlags::UseSandboxing to a new value 210 /// Set ClFlags::UseSandboxing to a new value
192 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; } 211 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; }
193 212
194 // Enum and integer accessors. 213 // Enum and integer accessors.
195 /// Get the value of ClFlags::Opt 214 /// Get the value of ClFlags::Opt
196 OptLevel getOptLevel() const { return Opt; } 215 OptLevel getOptLevel() const { return Opt; }
197 /// Set ClFlags::Opt to a new value 216 /// Set ClFlags::Opt to a new value
198 void setOptLevel(OptLevel NewValue) { Opt = NewValue; } 217 void setOptLevel(OptLevel NewValue) { Opt = NewValue; }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 /// see anonymous_namespace{IceClFlags.cpp}::DisableHybridAssembly 402 /// see anonymous_namespace{IceClFlags.cpp}::DisableHybridAssembly
384 bool DisableHybridAssembly; 403 bool DisableHybridAssembly;
385 /// see anonymous_namespace{IceClFlags.cpp}::DisableInternal 404 /// see anonymous_namespace{IceClFlags.cpp}::DisableInternal
386 bool DisableInternal; 405 bool DisableInternal;
387 /// see anonymous_namespace{IceClFlags.cpp}::DisableTranslation 406 /// see anonymous_namespace{IceClFlags.cpp}::DisableTranslation
388 bool DisableTranslation; 407 bool DisableTranslation;
389 /// see anonymous_namespace{IceClFlags.cpp}::DumpStats 408 /// see anonymous_namespace{IceClFlags.cpp}::DumpStats
390 bool DumpStats; 409 bool DumpStats;
391 /// see anonymous_namespace{IceClFlags.cpp}::EnableBlockProfile 410 /// see anonymous_namespace{IceClFlags.cpp}::EnableBlockProfile
392 bool EnableBlockProfile; 411 bool EnableBlockProfile;
412 /// see anonymous_namespace{IceClFlags.cpp}::ExcludedRegisters;
413 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.
393 /// see anonymous_namespace{IceClFlags.cpp}::ForceMemIntrinOpt 414 /// see anonymous_namespace{IceClFlags.cpp}::ForceMemIntrinOpt
394 bool ForceMemIntrinOpt; 415 bool ForceMemIntrinOpt;
395 /// see anonymous_namespace{IceClFlags.cpp}::FunctionSections 416 /// see anonymous_namespace{IceClFlags.cpp}::FunctionSections
396 bool FunctionSections; 417 bool FunctionSections;
397 /// Initialized to false; not set by the command line. 418 /// Initialized to false; not set by the command line.
398 bool GenerateUnitTestMessages; 419 bool GenerateUnitTestMessages;
399 /// see anonymous_namespace{IceClFlags.cpp}::MockBoundsCheck 420 /// see anonymous_namespace{IceClFlags.cpp}::MockBoundsCheck
400 bool MockBoundsCheck; 421 bool MockBoundsCheck;
401 /// see anonymous_namespace{IceClFlags.cpp}::EnablePhiEdgeSplit 422 /// see anonymous_namespace{IceClFlags.cpp}::EnablePhiEdgeSplit
402 bool PhiEdgeSplit; 423 bool PhiEdgeSplit;
(...skipping 12 matching lines...) Expand all
415 /// see anonymous_namespace{IceClFlags.cpp}::ReorderPooledConstants 436 /// see anonymous_namespace{IceClFlags.cpp}::ReorderPooledConstants
416 bool ReorderPooledConstants; 437 bool ReorderPooledConstants;
417 /// see anonymous_namespace{IceClFlags.cpp}::SkipUnimplemented 438 /// see anonymous_namespace{IceClFlags.cpp}::SkipUnimplemented
418 bool SkipUnimplemented; 439 bool SkipUnimplemented;
419 /// see anonymous_namespace{IceClFlags.cpp}::SubzeroTimingEnabled 440 /// see anonymous_namespace{IceClFlags.cpp}::SubzeroTimingEnabled
420 bool SubzeroTimingEnabled; 441 bool SubzeroTimingEnabled;
421 /// see anonymous_namespace{IceClFlags.cpp}::TimeEachFunction 442 /// see anonymous_namespace{IceClFlags.cpp}::TimeEachFunction
422 bool TimeEachFunction; 443 bool TimeEachFunction;
423 /// see anonymous_namespace{IceClFlags.cpp}::UseNonsfi 444 /// see anonymous_namespace{IceClFlags.cpp}::UseNonsfi
424 bool UseNonsfi; 445 bool UseNonsfi;
446 /// see anonymous_namespace{IceClFlags.cpp}::UseRegistrictedRegisters;
447 std::unordered_set<std::string> UseRestrictedRegisters;
425 /// see anonymous_namespace{IceClFlags.cpp}::UseSandboxing 448 /// see anonymous_namespace{IceClFlags.cpp}::UseSandboxing
426 bool UseSandboxing; 449 bool UseSandboxing;
427 /// see anonymous_namespace{IceClFlags.cpp}::OLevel 450 /// see anonymous_namespace{IceClFlags.cpp}::OLevel
428 OptLevel Opt; 451 OptLevel Opt;
429 /// see anonymous_namespace{IceClFlags.cpp}::OutFileType 452 /// see anonymous_namespace{IceClFlags.cpp}::OutFileType
430 FileType OutFileType; 453 FileType OutFileType;
431 /// see anonymous_namespace{IceClFlags.cpp}::RandomizeAndPoolImmediatesOption 454 /// see anonymous_namespace{IceClFlags.cpp}::RandomizeAndPoolImmediatesOption
432 RandomizeAndPoolImmediatesEnum RandomizeAndPoolImmediatesOption; 455 RandomizeAndPoolImmediatesEnum RandomizeAndPoolImmediatesOption;
433 /// see 456 /// see
434 /// anonymous_namespace{IceClFlags.cpp}::RandomizeAndPoolImmediatesThreshold 457 /// anonymous_namespace{IceClFlags.cpp}::RandomizeAndPoolImmediatesThreshold
(...skipping 27 matching lines...) Expand all
462 /// see anonymous_namespace{IceClFlags.cpp}::NumThreads 485 /// see anonymous_namespace{IceClFlags.cpp}::NumThreads
463 486
464 size_t NumTranslationThreads; // 0 means completely sequential 487 size_t NumTranslationThreads; // 0 means completely sequential
465 /// see anonymous_namespace{IceClFlags.cpp}::RandomSeed 488 /// see anonymous_namespace{IceClFlags.cpp}::RandomSeed
466 uint64_t RandomSeed; 489 uint64_t RandomSeed;
467 }; 490 };
468 491
469 } // end of namespace Ice 492 } // end of namespace Ice
470 493
471 #endif // SUBZERO_SRC_ICECLFLAGS_H 494 #endif // SUBZERO_SRC_ICECLFLAGS_H
OLDNEW
« 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