jhuber6 wrote: If this is only for internal it would probably be better to make an internal randomness function that takes the state as an argument instead of it being a global. I already do that in a few places. https://github.com/llvm/llvm-project/pull/159617