| Index: src/IceClFlags.cpp
|
| diff --git a/src/IceClFlags.cpp b/src/IceClFlags.cpp
|
| index d74ae82c0c9f827d9cffbbb06d413db860bf9fed..c7cf2eaa7b68b75aad5b1e83f930ec7d1a4b308b 100644
|
| --- a/src/IceClFlags.cpp
|
| +++ b/src/IceClFlags.cpp
|
| @@ -106,7 +106,8 @@ cl::opt<bool>
|
| // therefore the tests would need to be changed.
|
| cl::opt<unsigned long long>
|
| RandomSeed("sz-seed", cl::desc("Seed the random number generator"),
|
| - cl::init(time(0)));
|
| + // cl::init(time(0)));
|
| + cl::init(1));
|
|
|
| cl::opt<bool> ShouldDoNopInsertion("nop-insertion",
|
| cl::desc("Randomly insert NOPs"),
|
| @@ -258,6 +259,21 @@ cl::opt<std::string> OutputFilename("o", cl::desc("Override output filename"),
|
|
|
| Ice::IceString AppName;
|
|
|
| +// Define the command line options for immediates pooling and randomization
|
| +cl::opt<Ice::RandomizeAndPoolImmediatesEnum> RandomizeAndPoolImmediatesOption(
|
| + "randomize-pool-immediates",
|
| + cl::desc("Randomize or pooling the representation of immediates"),
|
| + cl::init(Ice::RPI_None),
|
| + // cl::init(Ice::RPI_Randomize),
|
| + // cl::init(Ice::RPI_Pool),
|
| + cl::values(clEnumValN(Ice::RPI_None, "none",
|
| + "Do not randomize or pooling immediates (default)"),
|
| + clEnumValN(Ice::RPI_Randomize, "randomize",
|
| + "Turn on immediate constants blinding"),
|
| + clEnumValN(Ice::RPI_Pool, "pool",
|
| + "Turn on immediate constants pooling"),
|
| + clEnumValEnd));
|
| +
|
| } // end of anonymous namespace
|
|
|
| namespace Ice {
|
| @@ -350,6 +366,10 @@ void ClFlags::getParsedClFlags(ClFlags &OutFlags) {
|
| OutFlags.setMaxNopsPerInstruction(::MaxNopsPerInstruction);
|
| OutFlags.setNopProbabilityAsPercentage(::NopProbabilityAsPercentage);
|
| OutFlags.setVerbose(VMask);
|
| +
|
| + // set for immediates randomization or pooling option
|
| + OutFlags.setRandomizeAndPoolImmediatesOption(
|
| + ::RandomizeAndPoolImmediatesOption);
|
| }
|
|
|
| void ClFlags::getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra) {
|
|
|