Lines Matching full:random

1 //===- llvm-stress.cpp - Generate random LL files to stress-test LLVM -----===//
9 // This program is a utility that generates random .ll files to stress-test
82 /// A utility class to provide a pseudo-random number generator which is
86 class Random { class
89 Random(unsigned _seed):Seed(_seed) {} in Random() function in llvm::__anone1ed83310111::Random
91 /// Return a random integer, up to a
96 // Only lowest 19 bits are random-ish. in Rand()
100 /// Return a random 64 bit integer.
114 /// Make this like a C++11 random device
122 assert(Val <= max() && "Random value out of range"); in operator ()()
152 /// modifying and adding new random instructions.
159 Modifier(BasicBlock *Block, PieceTable *PT, Random *R) in Modifier()
206 /// Return a random integer.
211 /// Return a random value from the list of known values.
230 /// Return a random value with a known type.
261 /// Return a random value of any pointer type.
272 /// Return a random value of any vector type.
283 /// Pick a random type.
288 /// Pick a random pointer type.
294 /// Pick a random vector type.
310 // Pick a random vector width in the range 2**0 to 2**4. in pickVectorType()
317 /// Pick a random scalar type.
328 /// Random number generator
329 Random *Ran;
338 LoadModifier(BasicBlock *BB, PieceTable *PT, Random *R) in LoadModifier()
351 StoreModifier(BasicBlock *BB, PieceTable *PT, Random *R) in StoreModifier()
370 BinModifier(BasicBlock *BB, PieceTable *PT, Random *R) in BinModifier()
414 ConstModifier(BasicBlock *BB, PieceTable *PT, Random *R) in ConstModifier()
431 // Generate 128 random bits, the size of the (currently) in Act()
465 AllocaModifier(BasicBlock *BB, PieceTable *PT, Random *R) in AllocaModifier()
477 ExtractElementModifier(BasicBlock *BB, PieceTable *PT, Random *R) in ExtractElementModifier()
491 ShuffModifier(BasicBlock *BB, PieceTable *PT, Random *R) in ShuffModifier()
523 InsertElementModifier(BasicBlock *BB, PieceTable *PT, Random *R) in InsertElementModifier()
539 CastModifier(BasicBlock *BB, PieceTable *PT, Random *R) in CastModifier()
617 SelectModifier(BasicBlock *BB, PieceTable *PT, Random *R) in SelectModifier()
640 CmpModifier(BasicBlock *BB, PieceTable *PT, Random *R) in CmpModifier()
670 static void FillFunction(Function *F, Random &R) { in FillFunction()
682 // List of modifiers which add new random instructions. in FillFunction()
695 // Generate the random instructions in FillFunction()
706 static void IntroduceControlFlow(Function *F, Random &R) { in IntroduceControlFlow()
741 Random R(SeedCL); in main()
742 // Generate lots of random instructions inside a single basic block. in main()