forked from yougar0/LOWLLVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsplit.h
30 lines (28 loc) · 825 Bytes
/
split.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
28
29
30
#ifndef TROB_SPLIT_H
#define TROB_SPLIT_H
// LLVM include
#include <llvm/Pass.h>
#include <llvm/IR/BasicBlock.h>
#include <llvm/Transforms/Utils/Local.h>
#include <llvm/Transforms/IPO.h>
#include <llvm/Transforms/Scalar.h>
#include <llvm/IR/Module.h>
#include <llvm/Support/CommandLine.h>
#include "util.h"
#include "crypto_util.h"
using namespace llvm;
namespace trob {
class SplitBasicBlock : public FunctionPass {
public:
static char ID;
SplitBasicBlock() : FunctionPass(ID), flag(true) {}
SplitBasicBlock(bool flag) : FunctionPass(ID), flag(flag) {}
bool runOnFunction(Function&);
private:
bool flag;
bool split(Function&);
bool containsPHI(BasicBlock&);
void shuffle(std::vector<int>&);
};
}
#endif