Add some utils in BasicBlockUtils.h
This commit is contained in:
parent
8800ebac66
commit
b6c1e7a961
1 changed files with 16 additions and 0 deletions
16
llvmpy/src/Transforms/Utils/BasicBlockUtils.py
Normal file
16
llvmpy/src/Transforms/Utils/BasicBlockUtils.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from binding import *
|
||||
from src.namespace import llvm
|
||||
from src.Value import MDNode
|
||||
from src.Instruction import Instruction, TerminatorInst
|
||||
llvm.includes.add('llvm/Transforms/Utils/BasicBlockUtils.h')
|
||||
|
||||
SplitBlockAndInsertIfThen = llvm.Function('SplitBlockAndInsertIfThen',
|
||||
ptr(TerminatorInst),
|
||||
ptr(Instruction), # cmp
|
||||
cast(bool, Bool), # unreachable
|
||||
ptr(MDNode)) # branchweights
|
||||
|
||||
ReplaceInstWithInst = llvm.Function('ReplaceInstWithInst',
|
||||
Void,
|
||||
ptr(Instruction), # from
|
||||
ptr(Instruction)) # to
|
||||
Loading…
Add table
Add a link
Reference in a new issue