| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
#ifndef LLVM_IR_SSACONTEXT_H |
| 16 |
#define LLVM_IR_SSACONTEXT_H |
| 17 |
|
| 18 |
#include "llvm/Support/Printable.h" |
| 19 |
|
| 20 |
namespace llvm { |
| 21 |
class BasicBlock; |
| 22 |
class Function; |
| 23 |
class Instruction; |
| 24 |
class Value; |
| 25 |
template <typename, bool> class DominatorTreeBase; |
| 26 |
template <typename _FunctionT> class GenericSSAContext; |
| 27 |
|
| 28 |
template <> class GenericSSAContext<Function> { |
| 29 |
Function *F; |
| 30 |
|
| 31 |
public: |
| 32 |
using BlockT = BasicBlock; |
| 33 |
using FunctionT = Function; |
| 34 |
using InstructionT = Instruction; |
| 35 |
using ValueRefT = Value *; |
| 36 |
using DominatorTreeT = DominatorTreeBase<BlockT, false>; |
| 37 |
|
| 38 |
static BasicBlock *getEntryBlock(Function &F); |
| 39 |
|
| 40 |
void setFunction(Function &Fn); |
| 41 |
Function *getFunction() const { return F; } |
| 42 |
|
| 43 |
Printable print(BasicBlock *Block) const; |
| 44 |
Printable print(Instruction *Inst) const; |
| 45 |
Printable print(Value *Value) const; |
| 46 |
}; |
| 47 |
|
| 48 |
using SSAContext = GenericSSAContext<Function>; |
| 49 |
|
| 50 |
} |
| 51 |
|
| 52 |
#endif |