Use separate random number generator for each randomization pass

This removes random number generator from GlobalContext class and decouples different randomization passes

1. Add a new constructor for random number generator which merge three arguments to into one seed for the underlying implementation of random number generator.

RandomNumberGenerator(uint64_t Seed, RandomizationPassesEnum RandomizationPassID, uint64_t Salt=0)

param Seed: Should be the global random number seed passed through command line.
param RandomizationPassID: Should be the ID for different randomization passes.
param Salt: Should be an additional integer salt, default to be 0.

2. Move the creation of random number generators to the call sites of randomization passes. Each randomization pass create its own random number generator with specific salt value.

Function reordering:		Salt = 0 (default)
Basic Block reordering:		Salt = Function Sequence Number
Global Variable reordering:	Salt = 0 (default)
Pooled Constants reordering:	Salt = Constants' Kind value (return of getKind())
               *Jump Tables:	Salt = 0
Nop Insertion:			Salt = Function Sequence Number
Register Alloc Randomization:	Salt = (Function Sequence Number << 1) ^ (Kind == RAK_Phi ? 0u : 1u)
Constants Blinding:		Salt = Function Sequence Number

*Jump tables are treated as pooled constants, but without Kind value as salt.

BUG=
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/1300993002.
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index a5e6064..a1c5aad 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -153,7 +153,7 @@
   /// Tries to do address mode optimization on a single instruction.
   void doAddressOpt();
   /// Randomly insert NOPs.
-  void doNopInsertion();
+  void doNopInsertion(RandomNumberGenerator &RNG);
   /// Lowers a single non-Phi instruction.
   void lower();
   /// Inserts and lowers a single high-level instruction at a specific insertion
@@ -213,9 +213,10 @@
   virtual const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const = 0;
   void regAlloc(RegAllocKind Kind);
 
-  virtual void makeRandomRegisterPermutation(
-      llvm::SmallVectorImpl<int32_t> &Permutation,
-      const llvm::SmallBitVector &ExcludeRegisters) const = 0;
+  virtual void
+  makeRandomRegisterPermutation(llvm::SmallVectorImpl<int32_t> &Permutation,
+                                const llvm::SmallBitVector &ExcludeRegisters,
+                                uint64_t Salt) const = 0;
 
   /// Save/restore any mutable state for the situation where code
   /// emission needs multiple passes, such as sandboxing or relaxation.
@@ -279,7 +280,8 @@
 
   virtual void doAddressOptLoad() {}
   virtual void doAddressOptStore() {}
-  virtual void randomlyInsertNop(float Probability) = 0;
+  virtual void randomlyInsertNop(float Probability,
+                                 RandomNumberGenerator &RNG) = 0;
   /// This gives the target an opportunity to post-process the lowered
   /// expansion before returning.
   virtual void postLower() {}