9#ifndef __IR2Vec_Utils__
10#define __IR2Vec_Utils__
12#include "llvm/ADT/SmallVector.h"
13#include "llvm/Demangle/Demangle.h"
14#include "llvm/IR/Module.h"
15#include "llvm/IRReader/IRReader.h"
16#include "llvm/Support/SourceMgr.h"
17#include "llvm/Support/raw_ostream.h"
25#define IR2VEC_DEBUG(X) \
27 if (IR2Vec::debug) { \
32using Vector = std::vector<double>;
33using VocabTy = std::map<std::string, Vector>;
34using abi::__cxa_demangle;
40extern std::string iname;
41extern std::string oname;
42extern std::string funcName;
50std::unique_ptr<llvm::Module> getLLVMIR();
51void scaleVector(Vector &vec,
float factor);
53std::string getDemagledName(
const llvm::Function *function);
54char *getActualName(llvm::Function *function);
55std::string updatedRes(IR2Vec::Vector tmp, llvm::Function *f, llvm::Module *M);