From 415b2fbef514989d665c40ca4d258e28526deedf Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Mon, 1 Oct 2018 12:19:10 +0000 Subject: [llvm-exegesis][NFC] Move random functions from CodeTemplate to SnippetGenerator. Summary: Just moving methods around. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52720 llvm-svn: 343461 --- llvm/tools/llvm-exegesis/lib/CodeTemplate.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'llvm/tools/llvm-exegesis/lib/CodeTemplate.h') diff --git a/llvm/tools/llvm-exegesis/lib/CodeTemplate.h b/llvm/tools/llvm-exegesis/lib/CodeTemplate.h index e330c6de133..e5006eb74c9 100644 --- a/llvm/tools/llvm-exegesis/lib/CodeTemplate.h +++ b/llvm/tools/llvm-exegesis/lib/CodeTemplate.h @@ -66,25 +66,6 @@ struct CodeTemplate { unsigned ScratchSpacePointerInReg = 0; }; -// A global Random Number Generator to randomize configurations. -// FIXME: Move random number generation into an object and make it seedable for -// unit tests. -std::mt19937 &randomGenerator(); - -// Picks a random bit among the bits set in Vector and returns its index. -// Precondition: Vector must have at least one bit set. -size_t randomBit(const llvm::BitVector &Vector); - -// Picks a random configuration, then selects a random def and a random use from -// it and finally set the selected values in the provided InstructionInstances. -void setRandomAliasing(const AliasingConfigurations &AliasingConfigurations, - InstructionTemplate &DefIB, InstructionTemplate &UseIB); - -// Assigns a Random Value to all Variables in IT that are still Invalid. -// Do not use any of the registers in `ForbiddenRegs`. -void randomizeUnsetVariables(const llvm::BitVector &ForbiddenRegs, - InstructionTemplate &IT); - } // namespace exegesis #endif // LLVM_TOOLS_LLVM_EXEGESIS_CODETEMPLATE_H -- cgit v1.2.3