-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInline.h
27 lines (21 loc) · 858 Bytes
/
Inline.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef INLINE_H
#define INLINE_H
#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <unordered_map>
#include "CallFunctionGraph.h"
using namespace llvm;
namespace Inline {
bool shouldInline(Function *F, CallFunctionGraph *CallGraph);
bool inlineFunction(CallInst *CallInstr);
Instruction *findFirstNonAlloca(Function *F);
void resolveAllocas(Function *Callee, Instruction *CallInstr, std::unordered_map<Value *, Value *> &AllocaMap);
void copyFunctionBody(Function *F, CallInst *CallInstr,
std::unordered_map<Value *, Value *>& FunctionArgumentsMap,
std::unordered_map<Value *, Value *> &ValuesMap);
}
#endif