Spatial
Simple Static Analysis in LLVM
ReplaceIRVar.h
Go to the documentation of this file.
1#ifndef REPLACEIRVAR_H
2#define REPLACEIRVAR_H
3
4#include "llvm/IR/BasicBlock.h"
5#include "llvm/IR/DebugInfo.h"
6#include "llvm/IR/DebugInfoMetadata.h"
7#include "llvm/IR/Function.h"
8#include "llvm/IR/Instruction.h"
9#include "llvm/IR/Instructions.h"
10#include "llvm/IR/IntrinsicInst.h"
11#include "llvm/IR/Module.h"
12#include <map>
13#include <string>
14
16private:
18 std::string NewName;
21 std::map<std::string, std::string> HashMap;
22 void init(llvm::Function &F);
23 void init(llvm::BasicBlock &BB);
24 void init(llvm::Module &M);
25 void format(std::string First, std::string Second);
26
27public:
29 void runOnFunction(llvm::Function &F);
30 void runOnBasicBlock(llvm::BasicBlock &BB);
31 void runOnModule(llvm::Module &M);
32};
33#endif
Definition: ReplaceIRVar.h:15
void runOnFunction(llvm::Function &F)
replace IR variable to Actual Variable for the Function passed as parameter
Definition: ReplaceIRVar.cpp:45
void runOnBasicBlock(llvm::BasicBlock &BB)
Definition: ReplaceIRVar.cpp:54
ReplaceIRVar()
Constructor of ReplaceIRVar class.
Definition: ReplaceIRVar.cpp:4
void runOnModule(llvm::Module &M)
replace IR variable to Actual Variable for the Module passed as parameter
Definition: ReplaceIRVar.cpp:78