/
pass.go
61 lines (45 loc) · 1.71 KB
/
pass.go
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package llvm
import "github.com/kkkunny/go-llvm/internal/binding"
type PassOption binding.LLVMPassBuilderOptionsRef
func NewPassOption() PassOption {
return PassOption(binding.LLVMCreatePassBuilderOptions())
}
func (o PassOption) binding() binding.LLVMPassBuilderOptionsRef {
return binding.LLVMPassBuilderOptionsRef(o)
}
func (o PassOption) SetVerifyEach(v bool) {
binding.LLVMPassBuilderOptionsSetVerifyEach(o.binding(), v)
}
func (o PassOption) SetDebugLogging(v bool) {
binding.LLVMPassBuilderOptionsSetDebugLogging(o.binding(), v)
}
func (o PassOption) SetLoopInterleaving(v bool) {
binding.LLVMPassBuilderOptionsSetLoopInterleaving(o.binding(), v)
}
func (o PassOption) SetLoopVectorization(v bool) {
binding.LLVMPassBuilderOptionsSetLoopVectorization(o.binding(), v)
}
func (o PassOption) SetSLPVectorization(v bool) {
binding.LLVMPassBuilderOptionsSetSLPVectorization(o.binding(), v)
}
func (o PassOption) SetLoopUnrolling(v bool) {
binding.LLVMPassBuilderOptionsSetLoopUnrolling(o.binding(), v)
}
func (o PassOption) SetForgetAllSCEVInLoopUnroll(v bool) {
binding.LLVMPassBuilderOptionsSetForgetAllSCEVInLoopUnroll(o.binding(), v)
}
func (o PassOption) SetLicmMssaOptCap(v uint32) {
binding.LLVMPassBuilderOptionsSetLicmMssaOptCap(o.binding(), v)
}
func (o PassOption) SetLicmMssaNoAccForPromotionCap(v uint32) {
binding.LLVMPassBuilderOptionsSetLicmMssaNoAccForPromotionCap(o.binding(), v)
}
func (o PassOption) SetCallGraphProfile(v bool) {
binding.LLVMPassBuilderOptionsSetCallGraphProfile(o.binding(), v)
}
func (o PassOption) SetMergeFunctions(v bool) {
binding.LLVMPassBuilderOptionsSetMergeFunctions(o.binding(), v)
}
func (o PassOption) Free() {
binding.LLVMDisposePassBuilderOptions(o.binding())
}