38 "foo",
"bar",
"baz",
"quux",
"barney",
"snork",
"zot",
"blam",
"hoge",
39 "wibble",
"wobble",
"widget",
"wombat",
"ham",
"eggs",
"pluto",
"spam" 50 void srand(
unsigned int seed) {
55 next = next * 1103515245 + 12345;
56 return (
unsigned int)(next / 65536) % 32768;
61 Renamer(
unsigned int seed) {
65 const char *newName() {
85 bool runOnModule(
Module &M)
override {
89 unsigned int randSeed = 0;
93 Renamer renamer(randSeed);
101 AI->setName(
"alias");
110 GI->setName(
"global");
115 StructTypes.
run(M,
true);
117 if (STy->isLiteral() || STy->getName().empty())
continue;
120 STy->setName((
Twine(
"struct.") +
126 getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
139 F.setName(renamer.newName());
148 if (!AI->getType()->isVoidTy())
155 if (!
I.getType()->isVoidTy())
167 "Assign new names to everything",
false,
false)
177 return new MetaRenamer();
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
amdgpu Simplify well known AMD library false Value Value const Twine & Name
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Class to represent struct types.
global_iterator global_begin()
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
ModulePass * createMetaRenamerPass()
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
static bool runOnFunction(Function &F, bool PostInlining)
alias_iterator alias_end()
Represent the analysis usage information of a pass.
StringRef toStringRef(bool B)
Construct a string ref from a boolean.
const std::string & getModuleIdentifier() const
Get the module identifier which is, essentially, the name of the module.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
global_iterator global_end()
void run(const Module &M, bool onlyNamed)
Module.h This file contains the declarations for the Module class.
Provides information about what library functions are available for the current target.
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
alias_iterator alias_begin()
void setPreservesAll()
Set by analyses that do not transform their input at all.
bool getLibFunc(StringRef funcName, LibFunc &F) const
Searches for a particular function name.
StringRef getName() const
Return a constant reference to the value's name.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
StringRef - Represent a constant reference to a string, i.e.
void initializeMetaRenamerPass(PassRegistry &)
TypeFinder - Walk over a module, identifying all of the types that are used by the module...