[llvm] [llvm-exegesis] Add CLI Option to set Fixed RNG seed (PR #170013)

David Green via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 29 23:25:04 PST 2025


================
@@ -187,8 +195,13 @@ generateUnconstrainedCodeTemplates(const InstructionTemplate &Variant,
 }
 
 std::mt19937 &randomGenerator() {
+  unsigned RandomSeed = RandomGeneratorSeed;
----------------
davemgreen wrote:

```
RandomSeed = RandomGeneratorSeed.getNumOccurrences() ? RandomGeneratorSeed : RandomDevice();
```
This can allow a seed of 0 too.

https://github.com/llvm/llvm-project/pull/170013


More information about the llvm-commits mailing list